Debian

Available patches from Ubuntu

To see Ubuntu differences wrt. to Debian, write down a grep-dctrl query identifying the packages you're interested in:
grep-dctrl -n -sPackage Sources.Debian
(e.g. -FPackage linux-ntfs or linux-ntfs)

Modified packages are listed below:

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: antlr3

antlr3 (3.2.is.3.2-7ubuntu3) quantal; urgency=low * Fix issue with links between maven-repo and /usr/share/java: - d/rules: Drop calls to mh_linkrepojar - these are no longer required as jar files are installed to /usr/share/java and links created from the /usr/share/maven-repo. -- James Page <james.page@ubuntu.com> Wed, 19 Sep 2012 09:58:41 +0100 antlr3 (3.2.is.3.2-7ubuntu2) quantal; urgency=low * Support installation alongside antlr2 packages (LP: #1049167): - d/antlr3.poms: Provide antlr3 prefixed names for the antlr jar files installed to /usr/share/java. This also makes the 'antlr3' command work again. -- James Page <james.page@ubuntu.com> Tue, 11 Sep 2012 16:26:47 +0100 antlr3 (3.2.is.3.2-7ubuntu1) quantal; urgency=low * Restore jar files to /usr/share/java (LP: #1049087): - d/antlr3.poms: Specify --java-lib flag for jars which are not maven plugins. -- James Page <james.page@ubuntu.com> Tue, 11 Sep 2012 14:06:19 +0100 antlr3 (3.2.is.3.2-7) quantal; urgency=low * No-change upload to Ubuntu -- Jeremy Bicha <jbicha@ubuntu.com> Sun, 01 Jul 2012 01:41:00 -0400

Modifications :
  1. Download patch debian/rules

    --- 3.2.is.3.2-7/debian/rules 2012-07-01 05:43:00.000000000 +0000 +++ 3.2.is.3.2-7ubuntu3/debian/rules 2012-09-19 09:15:00.000000000 +0000 @@ -29,9 +29,6 @@ before-mvn-build:: unpatch-poms mh_unpatchpoms -pantlr3 binary-post-install/antlr3:: - mh_linkrepojar -pantlr3 runtime/Java/pom.xml /usr/share/java/antlr3-runtime.jar - mh_linkrepojar -pantlr3 tool/pom.xml /usr/share/java/antlr3.jar - mh_linkrepojar -plibantlr3-gunit-java gunit/pom.xml /usr/share/java/antlr3-gunit.jar dh_installman -pantlr3 get-orig-source:
  2. Download patch debian/control

    --- 3.2.is.3.2-7/debian/control 2012-07-01 05:43:00.000000000 +0000 +++ 3.2.is.3.2-7ubuntu3/debian/control 2012-09-11 12:53:23.000000000 +0000 @@ -1,7 +1,8 @@ Source: antlr3 Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Ludovic Claude <ludovic.claude@laposte.net> Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.1), libstringtemplate-java (>= 3.2.1),
  3. Download patch debian/antlr3.poms

    --- 3.2.is.3.2-7/debian/antlr3.poms 2012-07-01 05:43:00.000000000 +0000 +++ 3.2.is.3.2-7ubuntu3/debian/antlr3.poms 2012-09-11 15:16:34.000000000 +0000 @@ -1,6 +1,6 @@ pom.xml -runtime/Java/pom.xml -tool/pom.xml +runtime/Java/pom.xml --java-lib --usj-name=antlr3-runtime +tool/pom.xml --java-lib --usj-name=antlr3 antlr3-maven-plugin/pom.xml --package=antlr3-maven-plugin -gunit/pom.xml --package=libantlr3-gunit-java +gunit/pom.xml --package=libantlr3-gunit-java --java-lib gunit-maven-plugin/pom.xml --package=antlr3-gunit-maven-plugin

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: apache-log4j1.2

apache-log4j1.2 (1.2.16-3ubuntu2) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page <james.page@ubuntu.com> Fri, 18 May 2012 11:33:24 +0100 apache-log4j1.2 (1.2.16-3ubuntu1) precise; urgency=low * Merge from Debian testing (LP: #922890). Remaining changes: - d/control: Depend on libmx4j-java (main) instead of libjboss-jmx-java (universe). - d/{rules,control}: Remove dependency on bnd and don't add OSGi headers to jar file. -- James Page <james.page@ubuntu.com> Thu, 09 Feb 2012 16:28:22 +0000

Modifications :
  1. Download patch debian/rules

    --- 1.2.16-3/debian/rules 2011-12-01 21:11:07.000000000 +0000 +++ 1.2.16-3ubuntu2/debian/rules 2011-12-12 05:46:15.000000000 +0000 @@ -16,13 +16,6 @@ clean:: -rm -rf debian/tmp common-build-indep:: - cat debian/log4j.bnd | sed s/VERSION/$(VERSION)/ > debian/.log4j-versioned.bnd - java -jar /usr/share/java/bnd.jar wrap -properties debian/.log4j-versioned.bnd dist/lib/log4j-$(VERSION).jar - java -jar /usr/share/java/bnd.jar wrap -properties debian/.log4j-versioned.bnd \ - -classpath /usr/share/java/jboss-jmx.jar,/usr/share/java/gnumail.jar,/usr/share/java/activation.jar \ - -output log4j.jar dist/lib/log4j-$(VERSION).jar - rm debian/.log4j-versioned.bnd dist/lib/log4j-$(VERSION).jar - mv log4j.jar dist/lib/log4j-$(VERSION).jar cp pom.xml dist/lib/log4j.javadoc.pom jar cvf dist/lib/log4j.javadoc.jar -C docs/api/ .
  2. Download patch debian/control

    --- 1.2.16-3/debian/control 2011-12-01 21:11:07.000000000 +0000 +++ 1.2.16-3ubuntu2/debian/control 2012-02-09 16:28:19.000000000 +0000 @@ -1,12 +1,13 @@ Source: apache-log4j1.2 Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Michael Koch <konqueror@gmx.de>, Varun Hiremath <varun@debian.org>, Kumar Appaiah <akumar@debian.org>, Torsten Werner <twerner@debian.org>, Ludovic Claude <ludovic.claude@laposte.net>, Jakub Adam <jakub.adam@ktknet.cz> Build-Depends: debhelper (>= 7), cdbs, default-jdk, ant, libgnujaf-java, - libgnumail-java, maven-repo-helper, default-jdk-doc, libjboss-jmx-java, bnd + libgnumail-java, maven-repo-helper, default-jdk-doc, libmx4j-java Standards-Version: 3.9.2 Homepage: http://logging.apache.org/log4j/1.2/ Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/apache-log4j1.2 @@ -15,7 +16,7 @@ Vcs-Browser: http://svn.debian.org/wsvn/ Package: liblog4j1.2-java Architecture: all Depends: ${misc:Depends} -Suggests: liblog4j1.2-java-doc, libgnumail-java, libjboss-jmx-java +Suggests: liblog4j1.2-java-doc, libgnumail-java, libmx4j-java Description: Logging library for java log4j is a tool to help the programmer output log statements to a variety of output targets.

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: axis

axis (1.4-16ubuntu1) quantal; urgency=low * Transition libservlet2.5-java -> libservlet3.0-java. -- James Page <james.page@ubuntu.com> Thu, 12 Jul 2012 14:22:03 +0100 axis (1.4-16build1) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page <james.page@ubuntu.com> Fri, 18 May 2012 11:34:21 +0100

Modifications :
  1. Download patch debian/rules

    --- 1.4-16.2/debian/rules 2011-11-01 19:40:38.000000000 +0000 +++ 1.4-16.2ubuntu1/debian/rules 2012-12-07 15:08:23.000000000 +0000 @@ -4,7 +4,7 @@ include /usr/share/cdbs/1/rules/debhelpe include /usr/share/cdbs/1/class/ant.mk JAVA_HOME := /usr/lib/jvm/default-java -DEB_JARS := $(ANT_HOME)/lib/ant-nodeps.jar wsdl4j commons-logging commons-discovery commons-httpclient activation gnumail servlet-api-2.5 xmlParserAPIs xercesImpl +DEB_JARS := $(ANT_HOME)/lib/ant-nodeps.jar wsdl4j commons-logging commons-discovery commons-httpclient activation gnumail servlet-api-3.0 xmlParserAPIs xercesImpl DEB_ANT_BUILD_TARGET := compile javadocs
  2. Download patch debian/control

    --- 1.4-16.2/debian/control 2011-11-01 19:40:38.000000000 +0000 +++ 1.4-16.2ubuntu1/debian/control 2012-12-07 15:08:23.000000000 +0000 @@ -1,14 +1,15 @@ Source: axis Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Michael Koch <konqueror@gmx.de>, Torsten Werner <twerner@debian.org>, Damien Raude-Morvan <drazzib@debian.org>, Jakub Adam <jakub.adam@ktknet.cz> Build-Depends: debhelper (>= 7), cdbs, ant-optional, default-jdk, libwsdl4j-java, libcommons-logging-java, libcommons-httpclient-java, - libcommons-discovery-java, libgnujaf-java, libgnumail-java, libservlet2.5-java, + libcommons-discovery-java, libgnujaf-java, libgnumail-java, libservlet3.0-java, maven-repo-helper Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/axis @@ -20,7 +21,7 @@ Architecture: all Recommends: ant Suggests: libaxis-java-doc Depends: libwsdl4j-java, libcommons-logging-java, libcommons-discovery-java, - libcommons-httpclient-java, libgnujaf-java, libgnumail-java, libservlet2.5-java, + libcommons-httpclient-java, libgnujaf-java, libgnumail-java, libservlet3.0-java, ${misc:Depends} Description: SOAP implementation in Java Apache AXIS is an implementation of the SOAP ("Simple Object Access Protocol")

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: batik

batik (1.7.ubuntu-8ubuntu2) quantal; urgency=low * Switch package to use default-jdk instead of openjdk-6: - d/control: Updated BDI's to use default-jdk instead of openjdk-6. - d/control: Updated to use default-jre-headless as runtime. -- James Page <james.page@ubuntu.com> Wed, 16 May 2012 17:50:14 +0100 batik (1.7.ubuntu-8ubuntu1) precise; urgency=low * Merge from Debian testing (LP: #946158), remaining changes: + fix upstream version since we're stuck with this fake upstream version until the next upstream release - update debian/rules * Drop debian/patches/series diff as Debian now has their own version which works fine * Mark Vcs-* as XS-Debian-Vcs-* - update debian/control -- Micah Gersten <micahg@ubuntu.com> Sun, 04 Mar 2012 02:36:50 -0600

Modifications :
  1. Download patch debian/rules

    --- 1.7+dfsg-3/debian/rules 2012-06-19 10:54:07.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/rules 2012-05-16 16:42:57.000000000 +0000 @@ -9,10 +9,13 @@ export JITC_PROCESSOR_TYPE=6 include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/ant.mk +export VERSION = $(shell echo $(DEB_UPSTREAM_VERSION) | sed s/\.ubuntu//) + arch = $(shell dpkg-architecture -qDEB_HOST_ARCH) JAVA_HOME_DIRS := /usr/lib/jvm/java-7-openjdk-$(arch) \ - /usr/lib/jvm/java-6-openjdk-$(arch) /usr/lib/jvm/java-6-openjdk + /usr/lib/jvm/java-6-openjdk-$(arch) /usr/lib/jvm/java-6-openjdk \ + /usr/lib/jvm/java-1.5.0-sun /usr/lib/jvm/java-6-sun ANT_HOME := /usr/share/ant DEB_JARS := $(ANT_HOME)/lib/ant-launcher.jar bfs \ gnujaxp js xalan2 xml-apis-ext @@ -23,17 +26,15 @@ DEB_ANT_BUILDFILE := build.xml DEB_ANT_CLEAN_TARGET := clean # Increasing memory of the compiler -ANT_OPTS := -Xms256m -Xmx256m -Dbuild.sysclasspath=only +ANT_OPTS := -Xms256m -Xmx256m LIBRARY=batik -UPSTREAM_VERSION = $(subst +dfsg,,$(DEB_UPSTREAM_VERSION)) - LIB_NAMES = all libs install/libbatik-java:: # Install poms ant maven-artifacts - for jar in batik-$(UPSTREAM_VERSION)/maven/*/$(UPSTREAM_VERSION)/*.jar; do \ + for jar in batik-$(VERSION)/maven/*/$(VERSION)/*.jar; do \ pom=$$(dirname $$jar)/$$(basename $$jar .jar).pom; \ mh_installpom -v -plibbatik-java $$pom; \ mh_installjar -plibbatik-java -l $$pom $$jar; \ @@ -41,17 +42,14 @@ install/libbatik-java:: # Install batik-all.jar and batik-libs.jar for name in $(LIB_NAMES); do \ - install -m 644 batik-$(UPSTREAM_VERSION)/lib/batik-$$name.jar debian/libbatik-java/usr/share/java/batik-$$name-$(UPSTREAM_VERSION).jar; \ - ln -s batik-$$name-$(UPSTREAM_VERSION).jar debian/libbatik-java/usr/share/java/batik-$$name.jar; \ + install -m 644 batik-$(VERSION)/lib/batik-$$name.jar debian/libbatik-java/usr/share/java/batik-$$name-$(VERSION).jar; \ + ln -s batik-$$name-$(VERSION).jar debian/libbatik-java/usr/share/java/batik-$$name.jar; \ done - ln -s batik-all-$(UPSTREAM_VERSION).jar debian/libbatik-java/usr/share/java/batik-$(UPSTREAM_VERSION).jar; \ - ln -s batik-all-$(UPSTREAM_VERSION).jar debian/libbatik-java/usr/share/java/batik.jar; \ + ln -s batik-all-$(VERSION).jar debian/libbatik-java/usr/share/java/batik-$(VERSION).jar; \ + ln -s batik-all-$(VERSION).jar debian/libbatik-java/usr/share/java/batik.jar; \ # Install wrapper scripts install -d debian/libbatik-java/usr/bin for prog in debian/wrappers/* ; do \ install -t debian/libbatik-java/usr/bin/ $$prog ; \ done - -clean:: - mh_clean
  2. Download patch debian/control

    --- 1.7+dfsg-3/debian/control 2012-06-23 13:04:18.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/control 2012-05-16 16:50:12.000000000 +0000 @@ -1,29 +1,29 @@ Source: batik Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Wolfgang Baer <WBaer@gmx.de>, Michael Koch <konqueror@gmx.de>, Vincent Fourmond <fourmond@debian.org>, Onkar Shinde <onkarshinde@ubuntu.com> -Standards-Version: 3.9.3 +Standards-Version: 3.9.2 Build-Depends: debhelper (>= 5.0), cdbs -Build-Depends-Indep: openjdk-6-jdk | openjdk-7-jdk, ant, +Build-Depends-Indep: default-jdk, ant, libbsf-java, libxalan2-java, rhino, libavalon-framework-java (>= 4.2.0), libcommons-io-java, libcommons-logging-java, libxml-commons-external-java, maven-repo-helper Homepage: http://xml.apache.org/batik/ -Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/batik -Vcs-Browser: http://svn.debian.org/viewsvn/pkg-java/trunk/batik +XS-Debian-Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/batik +XS-Debian-Vcs-Browser: http://svn.debian.org/viewsvn/pkg-java/trunk/batik Package: libbatik-java Architecture: all -Depends: default-jre-headless | java5-runtime-headless - | java6-runtime-headless | java7-runtime-headless, +Depends: default-jre-headless | java2-runtime-headless, libxalan2-java, libbsf-java, libavalon-framework-java (>= 4.2.0), libcommons-io-java, libcommons-logging-java, java-wrappers (>= 0.1.12), libxml-commons-external-java, ${misc:Depends} -Recommends: fop (>= 1:0.94), rhino, openjdk-6-jre | openjdk-7-jre-headless +Recommends: fop (>= 1:0.94), rhino, default-jre | java2-runtime Description: xml.apache.org SVG Library Batik is a toolkit for applications or applets that want to use images in the Scalable Vector Graphics (SVG) format for various purposes, such
  3. Download patch .pc/applied-patches

    --- 1.7+dfsg-3/.pc/applied-patches 2012-06-29 00:09:44.313341178 +0000 +++ 1.7.ubuntu-8ubuntu2/.pc/applied-patches 2012-06-29 00:09:45.065359738 +0000 @@ -1,3 +1,2 @@ 06_fix_paths_in_policy_files.patch source-1.5.patch -remove-js.patch
  4. Download patch debian/new-upstream

    --- 1.7+dfsg-3/debian/new-upstream 2012-03-12 19:57:14.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/new-upstream 2012-05-16 16:40:02.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # -# new-upstream: copyright 2012 by Vincent Fourmond. -# See debian/copyright file for details. +# new-upstream: copyright 2008 by Vincent Fourmond. +# Repackage a zip into a .tar.gz archive # # Called by uscan; from uscan(1): # @@ -15,25 +15,18 @@ # version=$2 -filename=`readlink -f $3` +filename=$3 dir=`mktemp -d` -curdir=`pwd` +# We repackage the upstream source zip file: +unzip $filename -d $dir +origname=batik_$version.orig.tar.gz -origname=batik_$version"+dfsg".orig.tar.xz - -echo "Repackaging batik version $version from $filename" - -# Abort on errors: -set -e - -# We repackage the upstream source file, skipping binary JAR files. +# We repackage excluding the lib/ subdir cd $dir -unzip $filename -cd $dir/batik* -find -name '*.jar' | xargs rm -cd .. -tar cvJf $curdir/../$origname batik*/ +tar cvz \ + -f $origname bat* cd - -rm -rf $dir +mv $dir/$origname .. +rm -rf $dir \ No newline at end of file
  5. Download patch debian/patches/remove-js.patch

    --- 1.7+dfsg-3/debian/patches/remove-js.patch 2012-03-12 19:57:14.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/patches/remove-js.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -Index: batik-1.7+dfsg/build.xml -=================================================================== ---- batik-1.7+dfsg.orig/build.xml 2012-03-12 20:23:44.334097595 +0100 -+++ batik-1.7+dfsg/build.xml 2012-03-12 20:24:06.986097050 +0100 -@@ -808,9 +808,9 @@ - <copy file="${src}/batik-xml.pom.template" tofile="${maven}/batik-xml/${completeVersion}/batik-xml-${completeVersion}.pom" filtering="true"/> - <copy file="${build}/lib/batik-xml.jar" tofile="${maven}/batik-xml/${completeVersion}/batik-xml-${completeVersion}.jar"/> - -- <mkdir dir="${maven}/batik-js/${completeVersion}"/> -- <copy file="${src}/batik-js.pom.template" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.pom" filtering="true"/> -- <copy file="${build}/lib/js.jar" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.jar"/> -+ <!-- <mkdir dir="${maven}/batik-js/${completeVersion}"/> --> -+ <!-- <copy file="${src}/batik-js.pom.template" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.pom" filtering="true"/> --> -+ <!-- <copy file="${build}/lib/js.jar" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.jar"/> --> - - <!-- Generate checksums of all artifacts and POMs --> - <checksum algorithm="MD5" fileext=".md5">
  6. Download patch debian/manpages/rasterizer.1

    --- 1.7+dfsg-3/debian/manpages/rasterizer.1 2012-06-19 11:01:14.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/manpages/rasterizer.1 2012-05-16 16:40:02.000000000 +0000 @@ -61,7 +61,7 @@ are floating point values. .TP \fB\-bg\fR <color> .IP -output color. The format for <color> is a.r.g.b, where a, r, g and b +ouput color. The format for <color> is a.r.g.b, where a, r, g and b are integer values. .TP \fB\-cssMedia\fR <media> @@ -158,7 +158,7 @@ are floating point values. .TP \fB\-bg\fR <color> .IP -output color. The format for <color> is a.r.g.b, where a, r, g and b +ouput color. The format for <color> is a.r.g.b, where a, r, g and b are integer values. .TP \fB\-cssMedia\fR <media>
  7. Download patch debian/watch

    --- 1.7+dfsg-3/debian/watch 2012-03-12 19:57:14.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/watch 2012-05-16 16:40:02.000000000 +0000 @@ -1,3 +1,2 @@ version=3 -opts=dversionmangle=s/\+dfsg// \ http://archive.apache.org/dist/xmlgraphics/batik/ batik-src-([0123456789.]*).zip debian debian/new-upstream Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-awt-util.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-awt-util.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-bridge.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-bridge.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-css.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-css.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-dom.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-dom.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-ext.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-ext.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-gvt.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-gvt.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-parser.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-parser.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-script.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-script.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-svg-dom.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-svg-dom.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-swing.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-swing.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-util.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-util.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/batik-xml.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/batik-xml.jar differ Binary files 1.7+dfsg-3/documentation-sources/content/demo/xml-apis-dom3.jar and 1.7.ubuntu-8ubuntu2/documentation-sources/content/demo/xml-apis-dom3.jar differ Binary files 1.7+dfsg-3/lib/build/ant-1.6.5.jar and 1.7.ubuntu-8ubuntu2/lib/build/ant-1.6.5.jar differ Binary files 1.7+dfsg-3/lib/build/ant-launcher-1.6.5.jar and 1.7.ubuntu-8ubuntu2/lib/build/ant-launcher-1.6.5.jar differ Binary files 1.7+dfsg-3/lib/build/crimson-1.1.3.jar and 1.7.ubuntu-8ubuntu2/lib/build/crimson-1.1.3.jar differ Binary files 1.7+dfsg-3/lib/js.jar and 1.7.ubuntu-8ubuntu2/lib/js.jar differ Binary files 1.7+dfsg-3/lib/pdf-transcoder.jar and 1.7.ubuntu-8ubuntu2/lib/pdf-transcoder.jar differ Binary files 1.7+dfsg-3/lib/xalan-2.6.0.jar and 1.7.ubuntu-8ubuntu2/lib/xalan-2.6.0.jar differ Binary files 1.7+dfsg-3/lib/xerces_2_5_0.jar and 1.7.ubuntu-8ubuntu2/lib/xerces_2_5_0.jar differ Binary files 1.7+dfsg-3/lib/xml-apis-ext.jar and 1.7.ubuntu-8ubuntu2/lib/xml-apis-ext.jar differ Binary files 1.7+dfsg-3/lib/xml-apis.jar and 1.7.ubuntu-8ubuntu2/lib/xml-apis.jar differ
  8. Download patch debian/patches/series

    --- 1.7+dfsg-3/debian/patches/series 2012-03-12 19:57:14.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/debian/patches/series 2012-05-16 16:40:02.000000000 +0000 @@ -1,3 +1,2 @@ 06_fix_paths_in_policy_files.patch source-1.5.patch -remove-js.patch
  9. Download patch .pc/remove-js.patch/build.xml
  10. Download patch build.xml

    --- 1.7+dfsg-3/build.xml 2012-06-29 00:09:44.000000000 +0000 +++ 1.7.ubuntu-8ubuntu2/build.xml 2012-06-29 00:09:45.000000000 +0000 @@ -808,9 +808,9 @@ JAVA=/usr/bin/java <copy file="${src}/batik-xml.pom.template" tofile="${maven}/batik-xml/${completeVersion}/batik-xml-${completeVersion}.pom" filtering="true"/> <copy file="${build}/lib/batik-xml.jar" tofile="${maven}/batik-xml/${completeVersion}/batik-xml-${completeVersion}.jar"/> - <!-- <mkdir dir="${maven}/batik-js/${completeVersion}"/> --> - <!-- <copy file="${src}/batik-js.pom.template" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.pom" filtering="true"/> --> - <!-- <copy file="${build}/lib/js.jar" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.jar"/> --> + <mkdir dir="${maven}/batik-js/${completeVersion}"/> + <copy file="${src}/batik-js.pom.template" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.pom" filtering="true"/> + <copy file="${build}/lib/js.jar" tofile="${maven}/batik-js/${completeVersion}/batik-js-${completeVersion}.jar"/> <!-- Generate checksums of all artifacts and POMs --> <checksum algorithm="MD5" fileext=".md5">
  11. Download patch debian/copyright

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: bsh

bsh (2.0b4-12ubuntu1) quantal; urgency=low * Transition libservlet2.5-java -> libservlet3.0-java (LP: #1023405). -- James Page <james.page@ubuntu.com> Thu, 12 Jul 2012 15:02:13 +0100 bsh (2.0b4-12build1) precise; urgency=low * No-change rebuild to drop spurious libsfgcc1 dependency on armhf. -- Adam Conrad <adconrad@ubuntu.com> Fri, 02 Dec 2011 17:31:18 -0700

Modifications :
  1. Download patch debian/rules

    --- 2.0b4-12/debian/rules 2010-06-11 14:21:39.000000000 +0000 +++ 2.0b4-12ubuntu1/debian/rules 2012-07-12 13:24:46.000000000 +0000 @@ -7,7 +7,7 @@ include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(DEB_UPSTREAM_VERSION) JAVA_HOME := /usr/lib/jvm/default-java -DEB_JARS := servlet-api-2.5 bsf javacc +DEB_JARS := servlet-api-3.0 bsf javacc DEB_ANT_BUILD_TARGET := javadoc jarall test include /usr/share/gcj/debian_defaults
  2. Download patch debian/control

    --- 2.0b4-12/debian/control 2010-06-11 14:21:39.000000000 +0000 +++ 2.0b4-12ubuntu1/debian/control 2012-07-12 13:25:26.000000000 +0000 @@ -1,9 +1,10 @@ Source: bsh Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Michael Koch <konqueror@gmx.de> -Build-Depends: debhelper (>= 7), cdbs, default-jdk-builddep, ant, libservlet2.5-java, libbsf-java, javacc, maven-repo-helper +Build-Depends: debhelper (>= 7), cdbs, default-jdk-builddep, ant, libservlet3.0-java, libbsf-java, javacc, maven-repo-helper Standards-Version: 3.8.4 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/bsh Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/bsh @@ -12,7 +13,7 @@ Homepage: http://www.beanshell.org/ Package: bsh Architecture: all Depends: ${misc:Depends}, default-jre-headless | java1-runtime-headless | java2-runtime-headless, libjline-java -Suggests: libservlet2.5-java, bsh-doc, default-jre | java1-runtime | java2-runtime +Suggests: libservlet3.0-java, bsh-doc, default-jre | java1-runtime | java2-runtime Enhances: libbsf-java Recommends: bsh-gcj Description: Java scripting environment (BeanShell) Version 2

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: clojure1.2

clojure1.2 (1.2.1+dfsg-4ubuntu1) quantal; urgency=low * Fix FTBFS now that default java implementation is no longer openjdk-6-jdk: - d/rules: Explicitly set JAVA_HOME to point to openjdk-6. -- James Page <james.page@ubuntu.com> Wed, 01 Aug 2012 14:20:52 +0100

Modifications :
  1. Download patch debian/rules

    --- 1.2.1+dfsg-4/debian/rules 2011-10-08 09:01:01.000000000 +0000 +++ 1.2.1+dfsg-4ubuntu1/debian/rules 2012-08-01 13:17:38.000000000 +0000 @@ -8,7 +8,8 @@ ORIG_VERSION = $(shell echo $(VERSION) | PRISTINE_VERSION = $(shell echo $(ORIG_VERSION) | sed s/\+dfsg//) UPSTREAM_VERSION = $(shell echo $(PRISTINE_VERSION) | sed s/^0\.0\.//) SRCDIR_NAME = $(SOURCE)-$(ORIG_VERSION).orig - +ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +JAVA_HOME= /usr/lib/jvm/java-1.6.0-openjdk-$(ARCH) include /usr/share/javahelper/java-vars.mk include /usr/share/cdbs/1/class/ant.mk include /usr/share/cdbs/1/rules/debhelper.mk
  2. Download patch debian/control

    --- 1.2.1+dfsg-4/debian/control 2011-10-08 09:01:01.000000000 +0000 +++ 1.2.1+dfsg-4ubuntu1/debian/control 2012-08-01 13:18:30.000000000 +0000 @@ -1,7 +1,8 @@ Source: clojure1.2 Section: devel Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Peter Collingbourne <peter@pcc.me.uk>, Daigo Moriwaki <daigo@debian.org> Build-Depends: debhelper (>= 5), cdbs, quilt Build-Depends-Indep: ant, openjdk-6-jdk, libasm3-java, maven-repo-helper, javahelper

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: clojure1.4

clojure1.4 (1.4.0+dfsg-2ubuntu2) quantal; urgency=low * Switch primary runtime dependency to default-jre. -- James Page <james.page@ubuntu.com> Thu, 09 Aug 2012 09:55:37 +0100 clojure1.4 (1.4.0+dfsg-2ubuntu1) quantal; urgency=low * Build-Depend on default-jdk instead of openjdk-6-jdk. OpenJDK 7 is now default in Ubuntu (Closes: #674930) -- Stefano Rivera <stefanor@ubuntu.com> Mon, 28 May 2012 15:14:46 +0100

Modifications :
  1. Download patch debian/control

    --- 1.4.0+dfsg-2/debian/control 2012-05-19 11:09:54.000000000 +0000 +++ 1.4.0+dfsg-2ubuntu2/debian/control 2012-08-09 08:48:00.000000000 +0000 @@ -1,10 +1,11 @@ Source: clojure1.4 Section: devel Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Peter Collingbourne <peter@pcc.me.uk>, Daigo Moriwaki <daigo@debian.org> Build-Depends: debhelper (>= 5), cdbs, quilt -Build-Depends-Indep: ant, openjdk-6-jdk, libasm3-java, maven-repo-helper, javahelper, libtext-markdown-perl | markdown +Build-Depends-Indep: ant, default-jdk, libasm3-java, maven-repo-helper, javahelper, libtext-markdown-perl | markdown Standards-Version: 3.9.3 Homepage: http://clojure.org Vcs-Git: git://git.debian.org/pkg-java/clojure.git @@ -13,7 +14,7 @@ DM-Upload-Allowed: yes Package: clojure1.4 Architecture: all -Depends: ${misc:Depends}, openjdk-6-jre | java2-runtime, libasm3-java +Depends: ${misc:Depends}, default-jre | java2-runtime, libasm3-java Recommends: rlwrap Conflicts: clojure (<= 1.1) Description: Lisp dialect for the JVM

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: commons-vfs

commons-vfs (2.0-3ubuntu1) quantal; urgency=low * Merge from Debian unstable. Remaining changes: - Use ant build system: + d/control: Drop B-D's on maven-debian-helper + cdbs and add B-D on maven-ant-helper, maven-repo-helper. + d/rules, d/build-classpath, d/build.xml, d/build.properties: Configure build to use customized version of maven-ant-helper build.xml + debhelper. + d/libcommons-vfs-java.poms: Update to pickup build artifacts and remove surplus pom files. + d/libcommons-vfs-java-doc.install: Pickup documentation from core component instead of aggregated javadoc. + d/control: Manually set dependencies for binary packages. - Enabled test suite: + d/patches/disable_webdav_provider.diff: Update patch to fix test that checks for webdav support. + d/build.xml: Ignore webdav when running tests. -- James Page <james.page@ubuntu.com> Fri, 22 Jun 2012 16:27:58 +0100

Modifications :
  1. Download patch debian/libcommons-vfs-java.poms

    --- 2.0-3/debian/libcommons-vfs-java.poms 2012-04-08 16:41:25.000000000 +0000 +++ 2.0-3ubuntu1/debian/libcommons-vfs-java.poms 2012-06-20 22:03:47.000000000 +0000 @@ -1,4 +1,2 @@ pom.xml -examples/pom.xml -core/pom.xml --java-lib -dist/pom.xml --ignore +core/pom.xml --java-lib --artifact=core/target/commons-vfs2-*.jar
  2. Download patch debian/build.properties

    --- 2.0-3/debian/build.properties 1970-01-01 00:00:00.000000000 +0000 +++ 2.0-3ubuntu1/debian/build.properties 2011-10-18 12:43:04.000000000 +0000 @@ -0,0 +1,10 @@ +build.javaVersion=1.5 +# Generate javadoc and link to required API packages +javadoc.generate=true +dependency=libcommons-logging-java +dependency2=libcommons-net2-java +dependency3=libcommons-collections3-java +dependency4=libcommons-httpclient-java +maven.test.exclude=**/RunTest.java +# Line up with maven defaults +build.directory=target
  3. Download patch debian/patches/disable_webdav_provider.diff

    --- 2.0-3/debian/patches/disable_webdav_provider.diff 2011-09-11 00:07:22.000000000 +0000 +++ 2.0-3ubuntu1/debian/patches/disable_webdav_provider.diff 2012-06-20 22:03:47.000000000 +0000 @@ -3,10 +3,10 @@ Description: Disable webdav module (sour Author: Damien Raude-Morvan <drazzib@debian.org> Last-Update: 2011-09-11 Forwarded: not-needed -Index: b/core/pom.xml +Index: commons-vfs-2.0/core/pom.xml =================================================================== ---- a/core/pom.xml -+++ b/core/pom.xml +--- commons-vfs-2.0.orig/core/pom.xml 2011-10-18 13:06:05.271986706 +0100 ++++ commons-vfs-2.0/core/pom.xml 2011-10-18 13:06:08.216010643 +0100 @@ -167,6 +167,36 @@ </configuration> </plugin> @@ -44,10 +44,10 @@ Index: b/core/pom.xml </plugins> </build> <profiles> -Index: b/pom.xml +Index: commons-vfs-2.0/pom.xml =================================================================== ---- a/pom.xml -+++ b/pom.xml +--- commons-vfs-2.0.orig/pom.xml 2011-10-18 13:06:05.291986869 +0100 ++++ commons-vfs-2.0/pom.xml 2011-10-18 13:06:08.216010643 +0100 @@ -243,6 +243,7 @@ </tag> </tags> @@ -56,3 +56,16 @@ Index: b/pom.xml </configuration> </plugin> <plugin> +Index: commons-vfs-2.0/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java +=================================================================== +--- commons-vfs-2.0.orig/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java 2011-10-18 13:06:02.194238000 +0100 ++++ commons-vfs-2.0/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java 2011-10-18 13:06:21.904121945 +0100 +@@ -119,7 +119,7 @@ + + private static String[] schemes = new String[] + { +- "webdav", "http", "ftp", "file", "zip", "tar", "tgz", "bz2", "gz", "jar", "tmp", "ram" ++ "http", "ftp", "file", "zip", "tar", "tgz", "bz2", "gz", "jar", "tmp", "ram" + }; + + public void testConfiguration() throws Exception
  4. Download patch debian/rules

    --- 2.0-3/debian/rules 2011-09-11 00:07:22.000000000 +0000 +++ 2.0-3ubuntu1/debian/rules 2012-06-20 22:03:47.000000000 +0000 @@ -1,14 +1,19 @@ #!/usr/bin/make -f # debian/rules for commons-vfs -include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/maven.mk +PACKAGE := $(shell dpkg-parsechangelog | grep '^Source:' | cut -f 2 -d ' ') +VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ' | cut -d: -f2- | sed 's/-[^-]*$$//') -JAVA_HOME := /usr/lib/jvm/default-java -PACKAGE := $(DEB_SOURCE_PACKAGE) -VERSION := $(DEB_UPSTREAM_VERSION) +export JAVA_HOME=/usr/lib/jvm/default-java +export CLASSPATH=$(shell for jar in `cat debian/build-classpath`; do if [ -f "$$jar" ]; then echo -n "$${jar}:"; fi; done) +export ANT_ARGS=-Dbasedir=$(realpath .)/core -Dpackage=$(PACKAGE) \ + -Dversion=$(VERSION) -Dbin.package=lib$(PACKAGE)-java \ + -Dpom.file=$(realpath .)/core/pom.xml -Ddebian.dir=$(realpath .)/debian \ + -propertyfile debian/build.properties \ + -f debian/build.xml -DEB_MAVEN_DOC_TARGET := javadoc:aggregate +%: + dh $@ --buildsystem=ant --with maven_repo_helper get-orig-source: uscan --force-download --rename
  5. Download patch debian/control

    --- 2.0-3/debian/control 2012-04-08 16:41:25.000000000 +0000 +++ 2.0-3ubuntu1/debian/control 2012-06-22 15:29:10.000000000 +0000 @@ -1,7 +1,8 @@ Source: commons-vfs Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Damien Raude-Morvan <drazzib@debian.org> Build-Depends-Indep: ant-doc, junit4, @@ -16,10 +17,9 @@ Build-Depends-Indep: ant-doc, libcommons-net2-java-doc, libcommons-parent-java, libjdom1-java-doc, - libjsch-java, - libmaven-antrun-plugin-java, - libmaven-javadoc-plugin-java -Build-Depends: cdbs, debhelper (>= 7), default-jdk, maven-debian-helper + libjsch-java +Build-Depends: debhelper (>= 7.0.50~), default-jdk, maven-ant-helper, + maven-repo-helper (>= 1.5~) Standards-Version: 3.9.3 Homepage: http://commons.apache.org/vfs/ Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/commons-vfs @@ -27,8 +27,12 @@ Vcs-Browser: http://svn.debian.org/wsvn/ Package: libcommons-vfs-java Architecture: all -Depends: ${maven:Depends}, ${misc:Depends} -Recommends: ${maven:OptionalDepends} +Depends: libcommons-logging-java, ${misc:Depends} +Recommends: ant, + libcommons-collections3-java, + libcommons-httpclient-java, + libcommons-net2-java, + libjsch-java Suggests: libcommons-vfs-java-doc Description: Java API for accessing various filesystems Commons VFS provides a single API for accessing various different file @@ -41,7 +45,11 @@ Description: Java API for accessing vari Package: libcommons-vfs-java-doc Architecture: all Section: doc -Depends: ${misc:Depends} +Depends: libcommons-collections3-java-doc, + libcommons-httpclient-java-doc, + libcommons-logging-java-doc, + libcommons-net2-java-doc, + ${misc:Depends} Recommends: default-jdk-doc Suggests: libcommons-vfs-java Description: Java API for accessing various filesystems - documentation
  6. Download patch core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java

    --- 2.0-3/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java 2011-08-18 13:57:07.000000000 +0000 +++ 2.0-3ubuntu1/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java 2012-06-29 00:10:46.000000000 +0000 @@ -119,7 +119,7 @@ public class DelegatingFileSystemOptions private static String[] schemes = new String[] { - "webdav", "http", "ftp", "file", "zip", "tar", "tgz", "bz2", "gz", "jar", "tmp", "ram" + "http", "ftp", "file", "zip", "tar", "tgz", "bz2", "gz", "jar", "tmp", "ram" }; public void testConfiguration() throws Exception
  7. Download patch debian/build.xml
  8. Download patch debian/libcommons-vfs-java-doc.install

    --- 2.0-3/debian/libcommons-vfs-java-doc.install 2011-09-11 00:07:22.000000000 +0000 +++ 2.0-3ubuntu1/debian/libcommons-vfs-java-doc.install 2012-06-20 22:03:47.000000000 +0000 @@ -1 +1 @@ -target/site/apidocs/* /usr/share/doc/libcommons-vfs-java/api/ +core/target/docs/api/* /usr/share/doc/libcommons-vfs-java/api/
  9. Download patch debian/build-classpath

    --- 2.0-3/debian/build-classpath 1970-01-01 00:00:00.000000000 +0000 +++ 2.0-3ubuntu1/debian/build-classpath 2011-10-18 13:13:22.000000000 +0000 @@ -0,0 +1,10 @@ +/usr/share/java/ant.jar +/usr/share/java/ant-junit4.jar +/usr/share/java/junit4.jar +/usr/share/java/commons-logging.jar +/usr/share/java/commons-net2.jar +/usr/share/java/commons-httpclient.jar +/usr/share/java/commons-compress.jar +/usr/share/java/jsch.jar +/usr/share/java/commons-collections3.jar +/usr/share/java/jdom.jar
  10. Download patch .pc/disable_webdav_provider.diff/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java

    --- 2.0-3/.pc/disable_webdav_provider.diff/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0-3ubuntu1/.pc/disable_webdav_provider.diff/core/src/test/java/org/apache/commons/vfs2/util/DelegatingFileSystemOptionsBuilderTest.java 2011-08-18 13:57:07.000000000 +0000 @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You 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 under the License. + */ +package org.apache.commons.vfs2.util; + +import java.io.File; +import java.lang.reflect.InvocationTargetException; + +import junit.framework.TestCase; + +import org.apache.commons.vfs2.FileSystemException; +import org.apache.commons.vfs2.FileSystemOptions; +import org.apache.commons.vfs2.impl.StandardFileSystemManager; +import org.apache.commons.vfs2.provider.http.HttpFileSystemConfigBuilder; +import org.apache.commons.vfs2.provider.sftp.SftpFileSystemConfigBuilder; +import org.apache.commons.vfs2.provider.sftp.TrustEveryoneUserInfo; + +/** + * Some tests for the DelegatingFileSystemOptionsBuilder + * + * @author <a href="mailto:imario@apache.org">Mario Ivankovits</a> + */ +public class DelegatingFileSystemOptionsBuilderTest extends TestCase +{ + private StandardFileSystemManager fsm = null; + + @Override + protected void setUp() throws Exception + { + super.setUp(); + + // get a full blown, fully functional manager + fsm = new StandardFileSystemManager(); + fsm.init(); + } + + + @Override + protected void tearDown() throws Exception + { + if (fsm != null) + { + fsm.close(); + } + + super.tearDown(); + } + + public void testDelegatingGood() throws Throwable + { + final String[] identityPaths = new String[] + { + "/file1", + "/file2", + }; + + FileSystemOptions opts = new FileSystemOptions(); + DelegatingFileSystemOptionsBuilder delgate = new DelegatingFileSystemOptionsBuilder(fsm); + + delgate.setConfigString(opts, "http", "proxyHost", "proxy"); + delgate.setConfigString(opts, "http", "proxyPort", "8080"); + delgate.setConfigClass(opts, "sftp", "userinfo", TrustEveryoneUserInfo.class); + delgate.setConfigStrings(opts, "sftp", "identities", identityPaths); + + assertEquals("http.proxyHost", HttpFileSystemConfigBuilder.getInstance().getProxyHost(opts), "proxy"); + assertEquals("http.proxyPort", HttpFileSystemConfigBuilder.getInstance().getProxyPort(opts), 8080); + assertEquals("sftp.userInfo", SftpFileSystemConfigBuilder.getInstance().getUserInfo(opts).getClass(), TrustEveryoneUserInfo.class); + + File identities[] = SftpFileSystemConfigBuilder.getInstance().getIdentities(opts); + assertNotNull("sftp.identities", identities); + assertEquals("sftp.identities size", identities.length, identityPaths.length); + for (int iterIdentities = 0; iterIdentities < identities.length; iterIdentities++) + { + assertEquals("sftp.identities #" + iterIdentities, + identities[iterIdentities].getAbsolutePath(), + new File(identityPaths[iterIdentities]).getAbsolutePath()); + } + } + + public void testDelegatingBad() throws Throwable + { + FileSystemOptions opts = new FileSystemOptions(); + DelegatingFileSystemOptionsBuilder delgate = new DelegatingFileSystemOptionsBuilder(fsm); + + try + { + delgate.setConfigString(opts, "http", "proxyPort", "wrong_port"); + fail(); + } + catch (FileSystemException e) + { + assertEquals(e.getCause().getClass(), InvocationTargetException.class); + assertEquals(((InvocationTargetException) e.getCause()).getTargetException().getClass(), NumberFormatException.class); + } + + try + { + delgate.setConfigClass(opts, "sftp", "userinfo", String.class); + fail(); + } + catch (FileSystemException e) + { + assertEquals(e.getCode(), "vfs.provider/config-value-invalid.error"); + } + } + + private static String[] schemes = new String[] + { + "webdav", "http", "ftp", "file", "zip", "tar", "tgz", "bz2", "gz", "jar", "tmp", "ram" + }; + + public void testConfiguration() throws Exception + { + for (int i=0; i < schemes.length; ++i) + { + assertTrue("Missing" + schemes[i] + " provider", fsm.hasProvider(schemes[i])); + } + } +}

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: dbus-java

dbus-java (2.8-2ubuntu1) precise; urgency=low * Merge from Debian testing. (LP: #905665) Remaining changes: - debian/rules: Use relative paths for the .jar dependencies. -- Mahyuddin Susanto <udienz@ubuntu.com> Sat, 17 Dec 2011 18:39:41 +0700

Modifications :
  1. Download patch debian/rules

    --- 2.8-4/debian/rules 2012-06-30 16:46:33.000000000 +0000 +++ 2.8-4ubuntu1/debian/rules 2012-11-03 14:16:18.000000000 +0000 @@ -37,8 +37,8 @@ override_dh_auto_install: override_dh_install: dh_install -i --sourcedir=debian/tmp override_jh_manifest: - jh_manifest -plibdbus-java -c"/usr/share/java/unix.jar /usr/share/java/hexdump.jar" - jh_manifest -pdbus-java-bin -c"/usr/share/java/dbus-$(VERSION).jar" + jh_manifest -plibdbus-java -c"unix.jar hexdump.jar" + jh_manifest -pdbus-java-bin -c"dbus-$(VERSION).jar" override_jh_depends: jh_depends -pdbus-java-bin -jopen jh_depends -plibdbus-java
  2. Download patch debian/control

    --- 2.8-4/debian/control 2012-06-30 16:50:05.000000000 +0000 +++ 2.8-4ubuntu1/debian/control 2012-11-03 14:16:18.000000000 +0000 @@ -1,7 +1,8 @@ Source: dbus-java Section: java Priority: optional -Maintainer: Debian Java Maintainer <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainer <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Matthew Johnson <mjj29@debian.org> Build-Depends: default-jdk, debhelper (>= 7.0.50~), @@ -67,5 +68,3 @@ Description: simple interprocess messagi This package provides the documentation for the Java implementation of D-Bus. . See the dbus description for more information about D-Bus in general. - -

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: doxia

doxia (1.1.4-1ubuntu3) precise; urgency=low * debian/patches/0008-doxia-logging-deps.patch: slightly adjust java package dependencies in doxia-modules and doxia-book pom files to include doxia-logging-api. * debian/rules: import the jar files we just build back into the temporary maven repository so they're accessible as we try to build docs. * debian/control: add a Build-Depends on libmaven-install-plugin-java. -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Wed, 23 Nov 2011 11:44:25 -0500 doxia (1.1.4-1ubuntu2) precise; urgency=low * debian/maven.properties: set maven to offline mode to avoid trying to download file from the web, which would fail the build. -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Tue, 22 Nov 2011 15:00:40 -0500 doxia (1.1.4-1ubuntu1) precise; urgency=low * debian/control: add Build-Depends for libjaxen-java. -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Mon, 21 Nov 2011 10:28:04 -0500

Modifications :
  1. Download patch doxia-modules/pom.xml

    --- 1.1.4-1/doxia-modules/pom.xml 2011-11-23 19:20:06.000000000 +0000 +++ 1.1.4-1ubuntu3/doxia-modules/pom.xml 2011-11-23 19:20:07.000000000 +0000 @@ -50,6 +50,10 @@ under the License. <dependencies> <dependency> <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-logging-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-core</artifactId> </dependency> <dependency>
  2. Download patch debian/rules

    --- 1.1.4-1/debian/rules 2011-09-09 22:28:03.000000000 +0000 +++ 1.1.4-1ubuntu3/debian/rules 2011-11-23 16:48:56.000000000 +0000 @@ -8,3 +8,22 @@ DEB_MAVEN_DOC_TARGET := javadoc:jar java get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename + +IMPORT_BINARY_JARS = \ + for jar in `find $(CURDIR)/doxia-* -name "*.jar" -print`; \ + do \ + artifact=$$(basename $$(dirname $$(echo $$jar | sed "s/\/target//"))); \ + echo "--- $$artifact ---"; \ + mvn install:install-file \ + -DgroupId=org.apache.maven.doxia \ + -DartifactId=$$artifact \ + -Dversion=1.1.4 \ + -Dmaven.repo.local=$(CURDIR)/debian/maven-repo \ + -Dpackaging=jar -Dfile=$$jar; \ + done; + +binary-jars: + $(call IMPORT_BINARY_JARS) + touch $@ + +after-mvn-build:: binary-jars
  3. Download patch debian/control

    --- 1.1.4-1/debian/control 2011-09-09 22:28:03.000000000 +0000 +++ 1.1.4-1ubuntu3/debian/control 2011-11-23 16:56:29.000000000 +0000 @@ -1,7 +1,8 @@ Source: doxia Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Michael Koch <konqueror@gmx.de>, Torsten Werner <twerner@debian.org> Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.4) Build-Depends-Indep: libclirr-maven-plugin-java, libmaven-plugin-tools-java, libmaven-shade-plugin-java, @@ -11,7 +12,7 @@ Build-Depends-Indep: libclirr-maven-plug libplexus-i18n-java, libplexus-utils-java, libxerces2-java, junit, libxerces2-java, default-jdk-doc, libcommons-configuration-java-doc, liblog4j1.2-java-doc, libmaven2-core-java-doc, libplexus-containers-java-doc, libplexus-utils-java-doc, - libmaven-javadoc-plugin-java + libmaven-javadoc-plugin-java, libjaxen-java, libmaven-install-plugin-java Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/doxia Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/doxia
  4. Download patch doxia-book/pom.xml

    --- 1.1.4-1/doxia-book/pom.xml 2011-11-23 19:20:06.000000000 +0000 +++ 1.1.4-1ubuntu3/doxia-book/pom.xml 2011-11-23 19:20:07.000000000 +0000 @@ -37,6 +37,10 @@ under the License. <!-- doxia core --> <dependency> <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-logging-api</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> <artifactId>doxia-core</artifactId> </dependency> <dependency>
  5. Download patch .pc/applied-patches

    --- 1.1.4-1/.pc/applied-patches 2011-11-23 19:20:06.000000000 +0000 +++ 1.1.4-1ubuntu3/.pc/applied-patches 2011-11-23 19:20:07.000000000 +0000 @@ -5,3 +5,4 @@ 0005-don-t-build-doxia-maven-plugin.patch 0006-specificy-source-and-target-version.patch 0007-disable-plexus-javadoc.patch +0008-doxia-logging-deps.patch
  6. Download patch .pc/0008-doxia-logging-deps.patch/doxia-book/pom.xml

    --- 1.1.4-1/.pc/0008-doxia-logging-deps.patch/doxia-book/pom.xml 1970-01-01 00:00:00.000000000 +0000 +++ 1.1.4-1ubuntu3/.pc/0008-doxia-logging-deps.patch/doxia-book/pom.xml 2011-11-23 19:20:07.000000000 +0000 @@ -0,0 +1,144 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you 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 +under the License. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia</artifactId> + <version>1.1.4</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>doxia-book</artifactId> + <name>Doxia :: Book Component</name> + <description>A component to write books like user manuals and guides in any format supported by Doxia.</description> + + <dependencies> + <!-- doxia core --> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-sink-api</artifactId> + </dependency> + + <!-- doxia modules ordered --> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-apt</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-docbook-simple</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-itext</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-latex</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-xdoc</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-module-xhtml</artifactId> + </dependency> + + <!-- plexus --> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-container-default</artifactId> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-i18n</artifactId> + <version>1.0-beta-6</version> + </dependency> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-utils</artifactId> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.codehaus.modello</groupId> + <artifactId>modello-maven-plugin</artifactId> + <configuration> + <models> + <model>src/main/modello/book.mdo</model> + </models> + <version>1.0.0</version> + </configuration> + <executions> + <execution> + <id>site-docs</id> + <phase>pre-site</phase> + <goals> + <goal>xdoc</goal> + <goal>xsd</goal> + </goals> + </execution> + <execution> + <id>descriptor</id> + <phase>generate-sources</phase> + <goals> + <goal>java</goal> + <goal>xpp3-reader</goal> + <goal>xsd</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>reporting</id> + <reporting> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>l10n-maven-plugin</artifactId> + <version>1.0-alpha-2</version> + <configuration> + <locales> + <locale>en</locale> + <locale>fr</locale> + </locales> + </configuration> + </plugin> + </plugins> + </reporting> + </profile> + </profiles> +</project> \ No newline at end of file
  7. Download patch debian/patches/0008-doxia-logging-deps.patch

    --- 1.1.4-1/debian/patches/0008-doxia-logging-deps.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.1.4-1ubuntu3/debian/patches/0008-doxia-logging-deps.patch 2011-11-23 17:11:25.000000000 +0000 @@ -0,0 +1,38 @@ +From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> +Subject: Add doxia-logging-api to dependencies for doxia-modules and doxia-book +Last-Update: 2011-11-23 + +It appears to be required at least for building documentation, otherwise the +build fails as it tries to resolve org.apache.maven.doxia.logging.LogEnabled, +among other symbols provided by doxia-logging-api. + +Index: doxia/doxia-modules/pom.xml +=================================================================== +--- doxia.orig/doxia-modules/pom.xml 2011-11-21 16:55:11.277656324 -0500 ++++ doxia/doxia-modules/pom.xml 2011-11-23 10:58:55.255900098 -0500 +@@ -50,6 +50,10 @@ + <dependencies> + <dependency> + <groupId>org.apache.maven.doxia</groupId> ++ <artifactId>doxia-logging-api</artifactId> ++ </dependency> ++ <dependency> ++ <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-core</artifactId> + </dependency> + <dependency> +Index: doxia/doxia-book/pom.xml +=================================================================== +--- doxia.orig/doxia-book/pom.xml 2011-11-21 16:55:15.685656130 -0500 ++++ doxia/doxia-book/pom.xml 2011-11-23 11:03:28.119915934 -0500 +@@ -37,6 +37,10 @@ + <!-- doxia core --> + <dependency> + <groupId>org.apache.maven.doxia</groupId> ++ <artifactId>doxia-logging-api</artifactId> ++ </dependency> ++ <dependency> ++ <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-core</artifactId> + </dependency> + <dependency>
  8. Download patch debian/patches/series

    --- 1.1.4-1/debian/patches/series 2011-09-09 22:28:03.000000000 +0000 +++ 1.1.4-1ubuntu3/debian/patches/series 2011-11-23 16:45:01.000000000 +0000 @@ -5,3 +5,4 @@ 0005-don-t-build-doxia-maven-plugin.patch 0006-specificy-source-and-target-version.patch 0007-disable-plexus-javadoc.patch +0008-doxia-logging-deps.patch
  9. Download patch .pc/0008-doxia-logging-deps.patch/doxia-modules/pom.xml

    --- 1.1.4-1/.pc/0008-doxia-logging-deps.patch/doxia-modules/pom.xml 1970-01-01 00:00:00.000000000 +0000 +++ 1.1.4-1ubuntu3/.pc/0008-doxia-logging-deps.patch/doxia-modules/pom.xml 2011-11-23 19:20:07.000000000 +0000 @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you 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 +under the License. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>doxia</artifactId> + <groupId>org.apache.maven.doxia</groupId> + <version>1.1.4</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>doxia-modules</artifactId> + + <name>Doxia :: Modules</name> + <packaging>pom</packaging> + + <description>Doxia modules for several markup languages.</description> + + <modules> + <module>doxia-module-apt</module> + <module>doxia-module-confluence</module> + <module>doxia-module-docbook-simple</module> + <module>doxia-module-fml</module> + <module>doxia-module-fo</module> + <module>doxia-module-itext</module> + <module>doxia-module-latex</module> + <module>doxia-module-rtf</module> + <module>doxia-module-twiki</module> + <module>doxia-module-xdoc</module> + <module>doxia-module-xhtml</module> + </modules> + + <dependencies> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.maven.doxia</groupId> + <artifactId>doxia-sink-api</artifactId> + </dependency> + + </dependencies> +</project>
  10. Download patch debian/maven.properties

    --- 1.1.4-1/debian/maven.properties 2011-09-09 22:28:03.000000000 +0000 +++ 1.1.4-1ubuntu3/debian/maven.properties 2011-11-22 19:50:09.000000000 +0000 @@ -2,4 +2,5 @@ # For example: maven.test.skip=true +maven.settings.offline=true

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: doxia-sitetools

doxia-sitetools (1.1.4-1ubuntu1) precise; urgency=low * debian/control: - re-add fop to Build-Depends. - add libjaxen-java to Build-Depends. - add libmaven-install-plugin-java to Build-Depends. * debian/maven.properties: ensure maven runs offline. * debian/rules: install just-built jar files back into the local maven repo for the build (they are required for building the docs). -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Thu, 24 Nov 2011 10:52:45 -0500

Modifications :
  1. Download patch debian/rules

    --- 1.1.4-1/debian/rules 2011-09-11 15:44:46.000000000 +0000 +++ 1.1.4-1ubuntu1/debian/rules 2011-11-24 16:10:14.000000000 +0000 @@ -8,3 +8,27 @@ DEB_MAVEN_DOC_TARGET := javadoc:jar java get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename + +IMPORT_BINARY_JARS = \ + for jar in `find $(CURDIR)/doxia-* -name "*.jar" -print`; \ + do \ + artifact=$$(basename $$(dirname $$(echo $$jar | sed "s/\/target//"))); \ + if ! test -d $(CURDIR)/debian/maven-repo/org/apache/maven/doxia/$$artifact/$(DEB_UPSTREAM_VERSION); \ + then \ + echo "Copying just-built binary jar for $$artifact into local maven repository."; \ + mvn install:install-file \ + -DgroupId=org.apache.maven.doxia \ + -DartifactId=$$artifact \ + -Dversion=$(DEB_UPSTREAM_VERSION) \ + -Dmaven.repo.local=$(CURDIR)/debian/maven-repo \ + -Dpackaging=jar -Dfile=$$jar; \ + else \ + echo "We already have the latest version JAR file for $$artifact in the local maven repo."; \ + fi; \ + done + +binary-jars: + $(call IMPORT_BINARY_JARS) + touch $@ + +after-mvn-build:: binary-jars
  2. Download patch debian/control

    --- 1.1.4-1/debian/control 2011-09-11 15:44:46.000000000 +0000 +++ 1.1.4-1ubuntu1/debian/control 2011-11-24 16:14:43.000000000 +0000 @@ -1,7 +1,8 @@ Source: doxia-sitetools Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Torsten Werner <twerner@debian.org>, Ludovic Claude <ludovic.claude@laposte.net>, Michael Koch <konqueror@gmx.de> Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.4) @@ -9,7 +10,8 @@ Build-Depends-Indep: libclirr-maven-plug libcommons-collections3-java, libdoxia-java, libitext1-java, libjaxp1.3-java, libplexus-containers-java, libplexus-i18n-java, libplexus-utils-java, libxalan2-java, junit (>= 3.8.2), libdoxia-java, default-jdk-doc, libdoxia-java-doc, libplexus-containers-java-doc, - libplexus-utils-java-doc, libxalan2-java-doc, libmaven-javadoc-plugin-java + libplexus-utils-java-doc, libxalan2-java-doc, libmaven-javadoc-plugin-java, + fop, libjaxen-java, libmaven-install-plugin-java Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/doxia-sitetools Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/doxia-sitetools/
  3. Download patch debian/maven.properties

    --- 1.1.4-1/debian/maven.properties 2011-09-11 15:44:46.000000000 +0000 +++ 1.1.4-1ubuntu1/debian/maven.properties 2011-11-24 15:52:39.000000000 +0000 @@ -2,3 +2,4 @@ # For example: maven.test.skip=true +maven.settings.offline=true

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: dynalang

dynalang (0.4-1ubuntu1) natty; urgency=low * Build-depend on ant1.7-optional. LP: #749268. -- Matthias Klose <doko@ubuntu.com> Sun, 03 Apr 2011 14:10:44 +0200

Modifications :
  1. Download patch debian/control

    --- 0.4-1/debian/control 2010-08-03 16:48:29.000000000 +0100 +++ 0.4-1ubuntu1/debian/control 2011-04-03 13:09:43.000000000 +0100 @@ -4,7 +4,7 @@ Priority: optional Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Torsten Werner <twerner@debian.org> Build-Depends: debhelper (>= 7), cdbs, javahelper -Build-Depends-Indep: ant-optional, default-jdk, junit, libemma-java +Build-Depends-Indep: ant1.7-optional, default-jdk, junit, libemma-java Standards-Version: 3.9.0 Vcs-Git: git://git.debian.org/pkg-java/dynalang.git Vcs-Browser: http://git.debian.org/?p=pkg-java/dynalang.git

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: eclipse

eclipse (3.8.0~rc4-1ubuntu1) quantal; urgency=low * Merge from Debian unstable. Remaining changes: - d/p/glib-single-include.patch: Fix FTBFS with glib 2.31+. -- James Page <james.page@ubuntu.com> Wed, 08 Aug 2012 09:47:19 +0000

Modifications :
  1. Download patch debian/patches/glib-single-include.patch

    --- 3.8.0~rc4-1/debian/patches/glib-single-include.patch 1970-01-01 00:00:00.000000000 +0000 +++ 3.8.0~rc4-1ubuntu1/debian/patches/glib-single-include.patch 2012-06-26 19:20:17.000000000 +0000 @@ -0,0 +1,12 @@ +Index: eclipse-3.8.0~rc3/eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c +=================================================================== +--- eclipse-3.8.0~rc3.orig/eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c 2012-06-02 05:46:43.000000000 -0400 ++++ eclipse-3.8.0~rc3/eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c 2012-06-26 14:29:05.612280569 -0400 +@@ -13,7 +13,6 @@ + #include <jni.h> + + #include <glib.h> +-#include <glib/gslist.h> + #include <gconf/gconf-value.h> + #include <gconf/gconf-client.h> +
  2. Download patch debian/control

    --- 3.8.0~rc4-1/debian/control 2012-06-24 21:59:00.000000000 +0000 +++ 3.8.0~rc4-1ubuntu1/debian/control 2012-06-29 01:09:06.000000000 +0000 @@ -1,7 +1,8 @@ Source: eclipse Section: devel Priority: optional -Maintainer: Debian Orbital Alignment Team <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Orbital Alignment Team <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Niels Thykier <niels@thykier.net>, Adnan Hodzic <adnan@foolcontrol.org>, Jimmy Kaplowitz <jimmy@debian.org>,
  3. Download patch eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c

    --- 3.8.0~rc4-1/eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c 2012-06-20 16:59:30.000000000 +0000 +++ 3.8.0~rc4-1ubuntu1/eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c 2012-08-08 14:08:30.000000000 +0000 @@ -13,7 +13,6 @@ #include <jni.h> #include <glib.h> -#include <glib/gslist.h> #include <gconf/gconf-value.h> #include <gconf/gconf-client.h>
  4. Download patch .pc/glib-single-include.patch/eclipse/plugins/org.eclipse.core.net/natives/unix/gnomeproxy.c
  5. Download patch .pc/applied-patches

    --- 3.8.0~rc4-1/.pc/applied-patches 2012-08-08 14:08:23.917261895 +0000 +++ 3.8.0~rc4-1ubuntu1/.pc/applied-patches 2012-08-08 14:08:30.545426708 +0000 @@ -38,3 +38,4 @@ install-libgnomeproxy-to-jni-directory.p eclipse-help-fix-jsp-precompilation.patch use-deb-build-compiler-flags.patch fix-gnu-kfreebsd-build.patch +glib-single-include.patch
  6. Download patch debian/patches/series

    --- 3.8.0~rc4-1/debian/patches/series 2012-06-18 08:24:21.000000000 +0000 +++ 3.8.0~rc4-1ubuntu1/debian/patches/series 2012-06-29 01:09:06.000000000 +0000 @@ -38,3 +38,4 @@ install-libgnomeproxy-to-jni-directory.p eclipse-help-fix-jsp-precompilation.patch use-deb-build-compiler-flags.patch fix-gnu-kfreebsd-build.patch +glib-single-include.patch

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: excalibur-logkit

excalibur-logkit (2.0-9ubuntu1) quantal; urgency=low * Transition libservlet2.5-java -> libservlet3.0-java (LP: #1023405). -- James Page <james.page@ubuntu.com> Thu, 12 Jul 2012 15:07:11 +0100 excalibur-logkit (2.0-9build1) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page <james.page@ubuntu.com> Fri, 18 May 2012 11:37:53 +0100

Modifications :
  1. Download patch debian/rules

    --- 2.0-9/debian/rules 2012-01-16 03:25:01.000000000 +0000 +++ 2.0-9ubuntu1/debian/rules 2012-07-12 13:30:42.000000000 +0000 @@ -4,7 +4,7 @@ include /usr/share/cdbs/1/rules/debhelpe include /usr/share/cdbs/1/class/ant.mk JAVA_HOME_DIRS := /usr/lib/jvm/default-java -DEB_JARS := ant-junit geronimo-jms-1.1-spec gnumail.jar junit log4j-1.2 servlet-api-2.5 +DEB_JARS := ant-junit geronimo-jms-1.1-spec gnumail.jar junit log4j-1.2 servlet-api-3.0 DEB_ANT_BUILD_TARGET := dist DEB_ANT_ARGS := -Dnoget=true -Dfinal.name=excalibur-logkit -Dant.build.javac.source=1.4 -Dant.build.javac.target=1.4 -Dlibdir=/usr/share/java
  2. Download patch debian/control

    --- 2.0-9/debian/control 2012-01-16 03:25:01.000000000 +0000 +++ 2.0-9ubuntu1/debian/control 2012-07-12 13:31:02.000000000 +0000 @@ -1,10 +1,11 @@ Source: excalibur-logkit Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Onkar Shinde <onkarshinde@ubuntu.com> Build-Depends: debhelper (>=5), cdbs, javahelper, ant -Build-Depends-Indep: default-jdk, default-jdk-doc, ant-optional, junit, libgeronimo-jms-1.1-spec-java, libgnumail-java, liblog4j1.2-java, libservlet2.5-java, libgnumail-java-doc, liblog4j1.2-java-doc, libservlet2.5-java-doc, maven-repo-helper +Build-Depends-Indep: default-jdk, default-jdk-doc, ant-optional, junit, libgeronimo-jms-1.1-spec-java, libgnumail-java, liblog4j1.2-java, libservlet3.0-java, libgnumail-java-doc, liblog4j1.2-java-doc, libservlet3.0-java-doc, maven-repo-helper Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/pkg-java/trunk/excalibur-logkit/ Vcs-Browser: http://svn.debian.org/viewsvn/pkg-java/trunk/excalibur-logkit/
  3. Download patch debian/patches/02_fix_build_xml.patch

    --- 2.0-9/debian/patches/02_fix_build_xml.patch 2011-06-04 20:27:50.000000000 +0000 +++ 2.0-9ubuntu1/debian/patches/02_fix_build_xml.patch 2012-07-12 14:03:29.000000000 +0000 @@ -35,7 +35,7 @@ Author: Onkar Shinde <onshinde@ubuntu.co + <link offline="true" packagelistLoc="/usr/share/doc/default-jdk-doc/api/" href="/usr/share/doc/default-jdk-doc/api/" /> + <link offline="true" packagelistLoc="/usr/share/doc/libgnumail-java/api/" href="/usr/share/doc/libgnumail-java/api/" /> + <link offline="true" packagelistLoc="/usr/share/doc/liblog4j1.2-java/api/" href="/usr/share/doc/liblog4j1.2-java/api/" /> -+ <link offline="true" packagelistLoc="/usr/share/doc/libservlet2.5-java/api/" href="/usr/share/doc/libservlet2.5-java/api/" /> ++ <link offline="true" packagelistLoc="/usr/share/doc/libservlet3.0-java/api/" href="/usr/share/doc/libservlet3.0-java/api/" /> </javadoc> </target> <target name="get-deps" unless="noget" depends="init">
  4. Download patch build.xml

    --- 2.0-9/build.xml 2012-07-12 15:05:54.000000000 +0000 +++ 2.0-9ubuntu1/build.xml 2012-07-12 15:05:54.000000000 +0000 @@ -207,7 +207,7 @@ <link offline="true" packagelistLoc="/usr/share/doc/default-jdk-doc/api/" href="/usr/share/doc/default-jdk-doc/api/" /> <link offline="true" packagelistLoc="/usr/share/doc/libgnumail-java/api/" href="/usr/share/doc/libgnumail-java/api/" /> <link offline="true" packagelistLoc="/usr/share/doc/liblog4j1.2-java/api/" href="/usr/share/doc/liblog4j1.2-java/api/" /> - <link offline="true" packagelistLoc="/usr/share/doc/libservlet2.5-java/api/" href="/usr/share/doc/libservlet2.5-java/api/" /> + <link offline="true" packagelistLoc="/usr/share/doc/libservlet3.0-java/api/" href="/usr/share/doc/libservlet3.0-java/api/" /> </javadoc> </target> <target name="get-deps" unless="noget" depends="init">

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: fop

fop (1:1.0.dfsg2-6ubuntu1) quantal; urgency=low * Transition libservlet2.5-java -> libservlet3.0-java (LP: #1023405). -- James Page <james.page@ubuntu.com> Thu, 12 Jul 2012 15:13:49 +0100 fop (1:1.0.dfsg2-6build1) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page <james.page@ubuntu.com> Fri, 18 May 2012 12:11:54 +0100

Modifications :
  1. Download patch debian/rules

    --- 1:1.0.dfsg2-6/debian/rules 2012-01-10 17:38:17.000000000 +0000 +++ 1:1.0.dfsg2-6ubuntu1/debian/rules 2012-07-12 14:07:51.000000000 +0000 @@ -5,7 +5,7 @@ include /usr/share/cdbs/1/rules/debhelpe include /usr/share/cdbs/1/class/ant.mk JAVA_HOME := /usr/lib/jvm/default-java -DEB_JARS := batik-all xml-apis-ext batik-libs xml-apis avalon-framework xercesImpl xmlParserAPIs xalan2 junit commons-io commons-logging xmlgraphics-commons servlet-api-2.5 # ant-junit junit xmlunit +DEB_JARS := batik-all xml-apis-ext batik-libs xml-apis avalon-framework xercesImpl xmlParserAPIs xalan2 junit commons-io commons-logging xmlgraphics-commons servlet-api-3.0 # ant-junit junit xmlunit DEB_ANT_BUILD_TARGET := package javadocs #junit #docs DEB_ANT_CLEAN_TARGET := distclean DEB_ANT_ARGS := -verbose
  2. Download patch debian/control

    --- 1:1.0.dfsg2-6/debian/control 2012-01-10 17:38:17.000000000 +0000 +++ 1:1.0.dfsg2-6ubuntu1/debian/control 2012-07-12 14:09:07.000000000 +0000 @@ -1,7 +1,8 @@ Source: fop Section: text Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> DM-Upload-Allowed: yes Uploaders: Sylvestre Ledru <sylvestre@debian.org>, Torsten Werner <twerner@debian.org>, @@ -12,7 +13,7 @@ Build-Depends-Indep: ant-optional (>= 1. libavalon-framework-java (>=4.1.2-2), libxalan2-java, libxerces2-java, default-jdk, libcommons-io-java, libxmlunit-java, libcommons-logging-java, junit, libxmlgraphics-commons-java (>= 1.4), - libservlet2.5-java, libxml-commons-external-java, maven-repo-helper, libqdox-java, + libservlet3.0-java, libxml-commons-external-java, maven-repo-helper, libqdox-java, unzip Standards-Version: 3.9.2 Homepage: http://xmlgraphics.apache.org/fop/ @@ -23,7 +24,7 @@ Package: fop Architecture: all Depends: ${misc:Depends}, default-jre-headless | java2-runtime-headless, libfop-java Recommends: libsaxon-java -Suggests: fop-doc, libservlet2.5-java +Suggests: fop-doc, libservlet3.0-java Description: XML formatter driven by XSL Formatting Objects (XSL-FO.) FOP is a Java application that reads a formatting object tree and then turns it into a wide variety of output presentations (including AFP,

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: freemind

freemind (0.9.0+dfsg-2ubuntu1) quantal; urgency=low * Add file URL list parameter (%U) to .desktop file (LP: #883008) -- Adrian Wilkins <adrian.wilkins@gmail.com> Wed, 11 Jul 2012 10:33:43 +0100

Modifications :
  1. Download patch debian/control

    --- 0.9.0+dfsg-2/debian/control 2011-09-07 23:51:25.000000000 +0000 +++ 0.9.0+dfsg-2ubuntu1/debian/control 2012-07-11 13:08:42.000000000 +0000 @@ -1,7 +1,8 @@ Source: freemind Section: editors Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Eric Lavarde <deb@zorglub.s.bawue.de> # FreeMind can be built with JiBX 1.0, 1.1 and 1.2, but the result does only # run with the version it was built with. JiBX 1.1 has been chosen for
  2. Download patch debian/freemind.desktop

    --- 0.9.0+dfsg-2/debian/freemind.desktop 2009-12-05 13:31:09.000000000 +0000 +++ 0.9.0+dfsg-2ubuntu1/debian/freemind.desktop 2012-07-11 13:08:17.000000000 +0000 @@ -1,7 +1,7 @@ [Desktop Entry] Version=1.0 Name=FreeMind -Exec=/usr/bin/freemind +Exec=/usr/bin/freemind %U Terminal=false Icon=FreeMindWindowIcon Type=Application

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: gant

gant (1.9.8-1ubuntu1) quantal; urgency=low * Merge from Debian experimental, remaining changes: - d/build.xml Fix detection of groovy, Ubuntu changed the version to 2.0.0+isreally1.8.5 and the build fails to find the class. -- James Page <james.page@ubuntu.com> Mon, 30 Jul 2012 13:49:59 +0100

Modifications :
  1. Download patch debian/control

    --- 1.9.8-1/debian/control 2012-07-26 14:57:20.000000000 +0000 +++ 1.9.8-1ubuntu1/debian/control 2012-07-30 12:46:42.000000000 +0000 @@ -1,7 +1,8 @@ Source: gant Section: devel Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> DM-Upload-Allowed: yes Uploaders: Varun Hiremath <varun@debian.org>, Torsten Werner <twerner@debian.org>, Miguel Landaeta <miguel@miguel.cc> Build-Depends: cdbs, debhelper (>= 7)
  2. Download patch debian/build.xml

    --- 1.9.8-1/debian/build.xml 2012-07-26 15:02:58.000000000 +0000 +++ 1.9.8-1ubuntu1/debian/build.xml 2012-07-30 12:46:42.000000000 +0000 @@ -78,6 +78,7 @@ Author : Russel Winder <russel.winder@co <echo message="Building with the Groovy installation at $GROOVY_HOME (${environment.GROOVY_HOME})."/> <path id="groovyJarPathId"> <fileset dir="${environment.GROOVY_HOME}/lib" includes="groovy-1.*.jar"/> + <fileset dir="${environment.GROOVY_HOME}/lib" includes="groovy-2.*.jar"/> </path> <path id="compileJarSetPathId"> <path refid="groovyJarPathId"/>

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: geogebra

geogebra (4.0.34.0+dfsg1-1ubuntu1) quantal; urgency=low * Ensure backwards compatible bytecode is built when building with openjdk-7 as default java (LP: #1033815): - d/ant.properties: Set source/target = 1.5. -- James Page <james.page@ubuntu.com> Wed, 15 Aug 2012 12:58:13 +0100

Modifications :
  1. Download patch debian/control

    --- 4.0.34.0+dfsg1-1/debian/control 2012-06-21 12:58:59.000000000 +0000 +++ 4.0.34.0+dfsg1-1ubuntu1/debian/control 2012-08-15 11:54:56.000000000 +0000 @@ -1,7 +1,8 @@ Source: geogebra Section: education Priority: extra -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Giovanni Mascellani <gio@debian.org> Build-Depends: debhelper (>= 7.0.50~),
  2. Download patch debian/ant.properties

    --- 4.0.34.0+dfsg1-1/debian/ant.properties 1970-01-01 00:00:00.000000000 +0000 +++ 4.0.34.0+dfsg1-1ubuntu1/debian/ant.properties 2012-08-15 11:53:41.000000000 +0000 @@ -0,0 +1,4 @@ +# Ensure that source and target are 1.5 +# For backwards compat on Java 7 +ant.build.javac.source=1.5 +ant.build.javac.target=1.5

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: geronimo-jta-1.1-spec

geronimo-jta-1.1-spec (1.1.1-2ubuntu2) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page <james.page@ubuntu.com> Fri, 18 May 2012 11:38:08 +0100 geronimo-jta-1.1-spec (1.1.1-2ubuntu1) precise; urgency=low * Switch build system to ant to support continued inclusion in Ubuntu main: - d/control: Drop Build-Depends on maven-debian-helper, add Build-Depends on ant + maven-{ant,repo}-helper, removed ${maven:*}. - d/rules: Switch back to ant build system. - d/ant.properties: Define extra configuration for maven-ant-helper. -- James Page <james.page@ubuntu.com> Thu, 24 Nov 2011 19:19:13 +0000

Modifications :
  1. Download patch debian/rules

    --- 1.1.1-2/debian/rules 2011-09-24 20:23:00.000000000 +0000 +++ 1.1.1-2ubuntu2/debian/rules 2011-11-24 19:18:18.000000000 +0000 @@ -1,9 +1,16 @@ #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk -include /usr/share/cdbs/1/class/maven.mk +include /usr/share/cdbs/1/class/ant.mk JAVA_HOME := /usr/lib/jvm/default-java +UPSTREAM_NAME := geronimo-jta_1.1_spec +DEB_ANT_BUILDFILE := /usr/share/maven-ant-helper/maven-build.xml +DEB_ANT_ARGS := -Dbasedir=$(realpath .) -Dpackage=$(DEB_SOURCE_PACKAGE) + +binary-post-install/lib$(DEB_SOURCE_PACKAGE)-java:: + mh_installpoms -plib$(DEB_SOURCE_PACKAGE)-java + mh_installjar -plib$(DEB_SOURCE_PACKAGE)-java --java-lib pom.xml build/$(UPSTREAM_NAME)-$(DEB_UPSTREAM_VERSION).jar get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
  2. Download patch debian/control

    --- 1.1.1-2/debian/control 2011-09-24 20:23:00.000000000 +0000 +++ 1.1.1-2ubuntu2/debian/control 2011-11-24 19:19:10.000000000 +0000 @@ -1,10 +1,11 @@ Source: geronimo-jta-1.1-spec Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Torsten Werner <twerner@debian.org> -Build-Depends: debhelper (>= 7), cdbs, default-jdk, maven-debian-helper (>= 1.4) -Build-Depends-Indep: default-jdk-doc, libmaven-javadoc-plugin-java +Build-Depends: debhelper (>= 7), cdbs, default-jdk, ant +Build-Depends-Indep: default-jdk-doc, maven-ant-helper, maven-repo-helper Standards-Version: 3.9.2 Homepage: http://geronimo.apache.org Vcs-Git: git://anonscm.debian.org/pkg-java/geronimo-jta-1.1-spec.git @@ -12,8 +13,7 @@ Vcs-Browser: http://anonscm.debian.org/g Package: libgeronimo-jta-1.1-spec-java Architecture: all -Depends: ${misc:Depends}, ${maven:Depends} -Recommends: ${maven:OptionalDepends} +Depends: ${misc:Depends} Suggests: libgeronimo-jta-java-doc Conflicts: libgeronimo-jta-1.0.1b-spec-java Replaces: libgeronimo-jta-1.0.1b-spec-java @@ -31,8 +31,7 @@ Description: Geronimo API implementation Package: libgeronimo-jta-1.1-spec-java-doc Architecture: all Section: doc -Depends: ${misc:Depends}, ${maven:DocDepends} -Recommends: ${maven:DocOptionalDepends} +Depends: ${misc:Depends} Suggests: libgeronimo-jta-java Description: Documentation for the JTA 1.1 spec The goal of the Geronimo project is to produce a server runtime framework
  3. Download patch debian/libgeronimo-jta-1.1-spec-java.poms

    --- 1.1.1-2/debian/libgeronimo-jta-1.1-spec-java.poms 2011-09-24 20:23:00.000000000 +0000 +++ 1.1.1-2ubuntu2/debian/libgeronimo-jta-1.1-spec-java.poms 2011-11-24 19:16:28.000000000 +0000 @@ -23,4 +23,4 @@ # --ignore-pom: don't install the POM with mh_install or mh_installpoms. To use with POM files that are created # temporarily for certain artifacts such as Javadoc jars. # -pom.xml --no-parent --has-package-version +pom.xml --no-parent --has-package-version
  4. Download patch debian/ant.properties

    --- 1.1.1-2/debian/ant.properties 1970-01-01 00:00:00.000000000 +0000 +++ 1.1.1-2ubuntu2/debian/ant.properties 2011-11-24 19:18:09.000000000 +0000 @@ -0,0 +1,3 @@ +javadoc.generate=true +maven.test.skip=true +javadoc.dir=target/apidocs

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: gluegen2


Modifications :
  1. Download patch debian/rules

    --- 2.0-rc11-1~exp1/debian/rules 2012-11-08 15:18:59.000000000 +0000 +++ 2.0-rc11-1~exp1ubuntu1/debian/rules 2013-01-09 00:08:42.000000000 +0000 @@ -10,6 +10,11 @@ DEB_ANT_CLEAN_TARGET := clean DEB_BUILDDIR := make DEB_ANT_BUILD_TARGET := all junit.run +ifeq ($(DEB_HOST_ARCH),armhf) +DEB_ANT_ARGS += -DisAbiEabiGnuArmhf=true +DEB_ANT_BUILD_TARGET := all.no_junit +endif + install/libgluegen2-rt-java:: install -m 644 -D build/gluegen-rt.jar debian/libgluegen2-rt-java/usr/share/java/gluegen2-$(DEB_UPSTREAM_VERSION)-rt.jar ln -s gluegen2-$(DEB_UPSTREAM_VERSION)-rt.jar debian/libgluegen2-rt-java/usr/share/java/gluegen2-rt.jar
  2. Download patch debian/control

    --- 2.0-rc11-1~exp1/debian/control 2012-11-08 15:18:59.000000000 +0000 +++ 2.0-rc11-1~exp1ubuntu1/debian/control 2013-01-08 20:45:26.000000000 +0000 @@ -1,7 +1,8 @@ Source: gluegen2 Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Sylvestre Ledru <sylvestre@debian.org> Build-Depends: debhelper (>= 7), cdbs, quilt, default-jdk, ant, junit4, ant-contrib-cpptasks, ant-optional, libantlr-java
  3. Download patch .pc/applied-patches

    --- 2.0-rc11-1~exp1/.pc/applied-patches 2013-01-09 13:36:10.609780866 +0000 +++ 2.0-rc11-1~exp1ubuntu1/.pc/applied-patches 2013-01-09 13:36:10.929789020 +0000 @@ -5,3 +5,4 @@ disable-test-zip-archive.diff disable_git_call.diff linker.diff hideException.diff +armhf.diff
  4. Download patch debian/patches/armhf.diff

    --- 2.0-rc11-1~exp1/debian/patches/armhf.diff 1970-01-01 00:00:00.000000000 +0000 +++ 2.0-rc11-1~exp1ubuntu1/debian/patches/armhf.diff 2013-01-08 20:44:58.000000000 +0000 @@ -0,0 +1,85 @@ +Index: b/make/build.xml +=================================================================== +--- a/make/build.xml ++++ b/make/build.xml +@@ -302,10 +302,16 @@ + <property name="linker.cfg.id" value="linker.cfg.linux" /> + </target> + +- <target name="declare.linux.armv6" if="isLinuxARMv6"> +- <echo message="Linux.armv6" /> +- <property name="compiler.cfg.id" value="compiler.cfg.linux.armv6" /> +- <property name="linker.cfg.id" value="linker.cfg.linux.armv6" /> ++ <target name="declare.linux.armv6.armel" if="isLinuxARMv6Armel"> ++ <echo message="Linux.armv6.armel" /> ++ <property name="compiler.cfg.id" value="compiler.cfg.linux.armv6.armel" /> ++ <property name="linker.cfg.id" value="linker.cfg.linux.armv6.armel" /> ++ </target> ++ ++ <target name="declare.linux.armv6.armhf" if="isLinuxARMv6Armhf"> ++ <echo message="Linux.armv6.armhf" /> ++ <property name="compiler.cfg.id" value="compiler.cfg.linux" /> ++ <property name="linker.cfg.id" value="linker.cfg.linux.armv6.armhf" /> + </target> + + <target name="declare.linux.alpha" if="isLinuxAlpha"> +@@ -356,7 +362,7 @@ + <property name="linker.cfg.id" value="linker.cfg.linux.sparc" /> + </target> + +- <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" > ++ <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" > + <property name="c.src.dir.os" value="unix" /> + <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" /> + </target> +Index: b/make/gluegen-cpptasks-base.xml +=================================================================== +--- a/make/gluegen-cpptasks-base.xml ++++ b/make/gluegen-cpptasks-base.xml +@@ -117,7 +117,7 @@ + - compiler.cfg.linux + - compiler.cfg.linux.x86 + - compiler.cfg.linux.amd64 +- - compiler.cfg.linux.armv6 ++ - compiler.cfg.linux.armv6.armel + - compiler.cfg.linux.alpha + - compiler.cfg.linux.hppa + - compiler.cfg.linux.mips +@@ -138,7 +138,8 @@ + - linker.cfg.linux + - linker.cfg.linux.x86 + - linker.cfg.linux.amd64 +- - linker.cfg.linux.armv6 ++ - linker.cfg.linux.armv6.armel ++ - linker.cfg.linux.armv6.armhf + - linker.cfg.linux.alpha + - linker.cfg.linux.hppa + - linker.cfg.linux.mips +@@ -901,7 +902,7 @@ + </defineset> + </compiler> + +- <compiler id="compiler.cfg.linux.armv6" name="gcc"> ++ <compiler id="compiler.cfg.linux.armv6.armel" name="gcc"> + <defineset> + <define name="__unix__"/> + <define name="__X11__" if="isX11"/> +@@ -1115,7 +1116,7 @@ + <linkerarg value="-static-libgcc"/> + </linker> + +- <linker id="linker.cfg.linux.armv6" name="gcc"> ++ <linker id="linker.cfg.linux.armv6.armel" name="gcc"> + <linkerarg value="-fpic" /> + <linkerarg value="-march=armv5te" /> + <linkerarg value="-marm" /> +@@ -1125,6 +1126,9 @@ + <linkerarg value="-static-libgcc"/> + </linker> + ++ <linker id="linker.cfg.linux.armv6.armhf" name="gcc"> ++ </linker> ++ + <linker id="linker.cfg.linux.alpha" name="gcc"> + </linker> +
  5. Download patch .pc/armhf.diff/make/build.xml
  6. Download patch make/build.xml

    --- 2.0-rc11-1~exp1/make/build.xml 2013-01-09 13:36:10.000000000 +0000 +++ 2.0-rc11-1~exp1ubuntu1/make/build.xml 2013-01-09 13:36:10.000000000 +0000 @@ -302,10 +302,16 @@ <property name="linker.cfg.id" value="linker.cfg.linux" /> </target> - <target name="declare.linux.armv6" if="isLinuxARMv6"> - <echo message="Linux.armv6" /> - <property name="compiler.cfg.id" value="compiler.cfg.linux.armv6" /> - <property name="linker.cfg.id" value="linker.cfg.linux.armv6" /> + <target name="declare.linux.armv6.armel" if="isLinuxARMv6Armel"> + <echo message="Linux.armv6.armel" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux.armv6.armel" /> + <property name="linker.cfg.id" value="linker.cfg.linux.armv6.armel" /> + </target> + + <target name="declare.linux.armv6.armhf" if="isLinuxARMv6Armhf"> + <echo message="Linux.armv6.armhf" /> + <property name="compiler.cfg.id" value="compiler.cfg.linux" /> + <property name="linker.cfg.id" value="linker.cfg.linux.armv6.armhf" /> </target> <target name="declare.linux.alpha" if="isLinuxAlpha"> @@ -356,7 +362,7 @@ <property name="linker.cfg.id" value="linker.cfg.linux.sparc" /> </target> - <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6" if="isLinux" > + <target name="declare.linux" depends="declare.linux.x86,declare.linux.amd64,declare.linux.ia64,declare.linux.hppa,declare.linux.mips,declare.linux.mipsel,declare.linux.ppc,declare.linux.s390,declare.linux.s390x,declare.linux.sparc,declare.linux.armv6.armel,declare.linux.armv6.armhf" if="isLinux" > <property name="c.src.dir.os" value="unix" /> <property name="java.includes.dir.platform" value="${java.includes.dir}/linux" /> </target>
  7. Download patch make/gluegen-cpptasks-base.xml

    --- 2.0-rc11-1~exp1/make/gluegen-cpptasks-base.xml 2013-01-09 13:36:10.000000000 +0000 +++ 2.0-rc11-1~exp1ubuntu1/make/gluegen-cpptasks-base.xml 2013-01-09 13:36:10.000000000 +0000 @@ -117,7 +117,7 @@ - compiler.cfg.linux - compiler.cfg.linux.x86 - compiler.cfg.linux.amd64 - - compiler.cfg.linux.armv6 + - compiler.cfg.linux.armv6.armel - compiler.cfg.linux.alpha - compiler.cfg.linux.hppa - compiler.cfg.linux.mips @@ -138,7 +138,8 @@ - linker.cfg.linux - linker.cfg.linux.x86 - linker.cfg.linux.amd64 - - linker.cfg.linux.armv6 + - linker.cfg.linux.armv6.armel + - linker.cfg.linux.armv6.armhf - linker.cfg.linux.alpha - linker.cfg.linux.hppa - linker.cfg.linux.mips @@ -901,7 +902,7 @@ </defineset> </compiler> - <compiler id="compiler.cfg.linux.armv6" name="gcc"> + <compiler id="compiler.cfg.linux.armv6.armel" name="gcc"> <defineset> <define name="__unix__"/> <define name="__X11__" if="isX11"/> @@ -1115,7 +1116,7 @@ <linkerarg value="-static-libgcc"/> </linker> - <linker id="linker.cfg.linux.armv6" name="gcc"> + <linker id="linker.cfg.linux.armv6.armel" name="gcc"> <linkerarg value="-fpic" /> <linkerarg value="-march=armv5te" /> <linkerarg value="-marm" /> @@ -1125,6 +1126,9 @@ <linkerarg value="-static-libgcc"/> </linker> + <linker id="linker.cfg.linux.armv6.armhf" name="gcc"> + </linker> + <linker id="linker.cfg.linux.alpha" name="gcc"> </linker>
  8. Download patch debian/patches/series

    --- 2.0-rc11-1~exp1/debian/patches/series 2012-11-08 15:31:17.000000000 +0000 +++ 2.0-rc11-1~exp1ubuntu1/debian/patches/series 2013-01-08 20:25:04.000000000 +0000 @@ -14,3 +14,4 @@ hideException.diff #s390x.diff #duplicatedeclaration.diff #disable_android2.diff +armhf.diff
  9. Download patch .pc/armhf.diff/make/gluegen-cpptasks-base.xml

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: groovy

groovy (2.0.0~beta2+isreally1.8.6-0ubuntu1) precise; urgency=low * New upstream release. * Fix jar naming issues caused by +isreally (LP: #953533): - d/rules: Figure out real upstream version number and install jars to /usr/share/groovy/lib with the correct versioning. -- James Page <james.page@ubuntu.com> Thu, 15 Mar 2012 13:25:54 +0000 groovy (2.0.0~beta2+isreally1.8.5-0ubuntu1) precise; urgency=low * Upload 1.8.5 as 2.0.0 due to accidental sync of 2.0.0 beta from Debian experimental. -- James Page <james.page@ubuntu.com> Wed, 18 Jan 2012 10:27:54 +0100

Modifications :
  1. Download patch debian/patches/0002-ant-build.diff.patch
  2. Download patch src/main/groovy/util/ObservableMap.java

    --- 2.0.0~beta2-1/src/main/groovy/util/ObservableMap.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/ObservableMap.java 2012-02-09 20:55:10.000000000 +0000 @@ -325,8 +325,36 @@ public class ObservableMap implements Ma } public abstract static class PropertyEvent extends PropertyChangeEvent { + /** + * deprecated + */ + public static final int ADDED = ChangeType.ADDED.ordinal(); + /** + * deprecated + */ + public static final int UPDATED = ChangeType.UPDATED.ordinal(); + /** + * deprecated + */ + public static final int REMOVED = ChangeType.REMOVED.ordinal(); + /** + * deprecated + */ + public static final int CLEARED = ChangeType.CLEARED.ordinal(); + /** + * deprecated + */ + public static final int MULTI = ChangeType.MULTI.ordinal(); + private ChangeType type; + /** + * @deprecated + */ + public PropertyEvent(Object source, String propertyName, Object oldValue, Object newValue, int type) { + this(source, propertyName, oldValue, newValue, ChangeType.resolve(type)); + } + public PropertyEvent(Object source, String propertyName, Object oldValue, Object newValue, ChangeType type) { super(source, propertyName, oldValue, newValue); this.type = type; @@ -364,6 +392,10 @@ public class ObservableMap implements Ma } public static class PropertyClearedEvent extends PropertyEvent { + /** + * @deprecated + */ + public static final String CLEAR_PROPERTY = ObservableMap.CLEARED_PROPERTY; private Map values = new HashMap(); public PropertyClearedEvent(Object source, Map values) {
  3. Download patch src/main/groovy/util/ObservableList.java

    --- 2.0.0~beta2-1/src/main/groovy/util/ObservableList.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/ObservableList.java 2012-02-09 20:55:10.000000000 +0000 @@ -503,10 +503,41 @@ public class ObservableList implements L } public abstract static class ElementEvent extends PropertyChangeEvent { + /** + * deprecated + */ + public static final int ADDED = ChangeType.ADDED.ordinal(); + /** + * deprecated + */ + public static final int UPDATED = ChangeType.UPDATED.ordinal(); + /** + * deprecated + */ + public static final int REMOVED = ChangeType.REMOVED.ordinal(); + /** + * deprecated + */ + public static final int CLEARED = ChangeType.CLEARED.ordinal(); + /** + * deprecated + */ + public static final int MULTI_ADD = ChangeType.MULTI_ADD.ordinal(); + /** + * deprecated + */ + public static final int MULTI_REMOVE = ChangeType.MULTI_REMOVE.ordinal(); private final ChangeType type; private final int index; + /** + * @deprecated + */ + public ElementEvent(Object source, Object oldValue, Object newValue, int index, int type) { + this(source, oldValue, newValue, index, ChangeType.resolve(type)); + } + public ElementEvent(Object source, Object oldValue, Object newValue, int index, ChangeType type) { super(source, ObservableList.CONTENT_PROPERTY, oldValue, newValue); this.type = type;
  4. Download patch src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java

    --- 2.0.0~beta2-1/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/org/codehaus/groovy/antlr/AntlrParserPlugin.java 2012-02-09 20:55:10.000000000 +0000 @@ -670,6 +670,7 @@ public class AntlrParserPlugin extends A ClassNode oldNode = classNode; enumClass.addAnnotations(annotations); classNode = enumClass; + configureAST(classNode, enumNode); assertNodeType(OBJBLOCK, node); objectBlock(node); classNode = oldNode; @@ -1207,10 +1208,8 @@ public class AntlrParserPlugin extends A statement = variableDef(node); break; - case LABELED_STAT: - statement = labelledStatement(node); - break; + return labelledStatement(node); case LITERAL_assert: statement = assertStatement(node); @@ -1570,8 +1569,7 @@ public class AntlrParserPlugin extends A // let's do the catch nodes List<CatchStatement> catches = new ArrayList<CatchStatement>(); for (; node != null && isType(LITERAL_catch, node); node = node.getNextSibling()) { - final List<CatchStatement> catchStatements = catchStatement(node); - catches.addAll(catchStatements); + catches.add(catchStatement(node)); } if (isType(LITERAL_finally, node)) { @@ -1591,37 +1589,17 @@ public class AntlrParserPlugin extends A return tryCatchStatement; } - protected List<CatchStatement> catchStatement(AST catchNode) { + protected CatchStatement catchStatement(AST catchNode) { AST node = catchNode.getFirstChild(); - List<CatchStatement> catches = new LinkedList<CatchStatement>(); - Statement code = statement(node.getNextSibling()); - if (MULTICATCH == node.getType()) { - AST variableNode = node.getNextSibling(); - final AST multicatches = node.getFirstChild(); - if (multicatches.getType() != MULTICATCH_TYPES) { - // catch (e) - // catch (def e) - String variable = identifier(multicatches); - Parameter catchParameter = new Parameter(ClassHelper.DYNAMIC_TYPE, variable); - CatchStatement answer = new CatchStatement(catchParameter, code); - configureAST(answer, catchNode); - catches.add(answer); - } else { - // catch (Exception e) - // catch (Exception1 | Exception2 e) - AST exceptionNodes = multicatches.getFirstChild(); - String variable = identifier(multicatches.getNextSibling()); - while (exceptionNodes != null) { - ClassNode exceptionType = buildName(exceptionNodes); - Parameter catchParameter = new Parameter(exceptionType, variable); - CatchStatement answer = new CatchStatement(catchParameter, code); - configureAST(answer, catchNode); - catches.add(answer); - exceptionNodes = exceptionNodes.getNextSibling(); - } - } - } - return catches; + Parameter parameter = parameter(node); + ClassNode exceptionType = parameter.getType(); + String variable = parameter.getName(); + node = node.getNextSibling(); + Statement code = statement(node); + Parameter catchParameter = new Parameter(exceptionType, variable); + CatchStatement answer = new CatchStatement(catchParameter, code); + configureAST(answer, catchNode); + return answer; } protected Statement whileStatement(AST whileNode) { @@ -2858,8 +2836,9 @@ public class AntlrParserPlugin extends A private ClassNode addTypeArguments(ClassNode basicType, AST node) { List<GenericsType> typeArgumentList = getTypeArgumentsList(node); - // a 0-length type argument list means we face the diamond operator - basicType.setGenericsTypes(typeArgumentList.toArray(new GenericsType[typeArgumentList.size()])); + if (typeArgumentList.size() > 0) { + basicType.setGenericsTypes(typeArgumentList.toArray(new GenericsType[typeArgumentList.size()])); + } return basicType; }
  5. Download patch src/main/groovy/util/Node.java
  6. Download patch src/main/groovy/transform/InheritConstructors.java

    --- 2.0.0~beta2-1/src/main/groovy/transform/InheritConstructors.java 2011-12-06 17:28:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/transform/InheritConstructors.java 2012-02-07 18:53:16.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2008-2010 the original author or authors. + * Copyright 2008-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -101,7 +101,7 @@ import java.lang.annotation.Target; * this AST transformation. This means that you can't override (i.e. not * inherit) the constructors with signatures that Groovy adds later. * If you get it wrong you will get a compile-time error about the duplication. - * <p> + * </p> * * @author Paul King * @since 1.7.3
  7. Download patch src/main/groovy/swing/factory/ColumnModelFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/ColumnModelFactory.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/ColumnModelFactory.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -16,6 +16,7 @@ package groovy.swing.factory +import java.util.logging.Logger import javax.swing.JTable import javax.swing.table.TableColumnModel import groovy.util.logging.Log
  8. Download patch src/main/groovy/swing/factory/ColumnFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/ColumnFactory.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/ColumnFactory.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -16,6 +16,7 @@ package groovy.swing.factory +import java.util.logging.Logger import javax.swing.table.TableCellRenderer import javax.swing.table.TableColumn import javax.swing.table.TableColumnModel
  9. Download patch gradlew

    --- 2.0.0~beta2-1/gradlew 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradlew 2012-02-09 20:55:10.000000000 +0000 @@ -7,25 +7,21 @@ ############################################################################## # Uncomment those lines to set JVM options. GRADLE_OPTS and JAVA_OPTS can be used together. -# GRADLE_OPTS="$GRADLE_OPTS -Xmx512m" +GRADLE_OPTS="$GRADLE_OPTS -Xmx640m" # JAVA_OPTS="$JAVA_OPTS -Xmx512m" GRADLE_APP_NAME=Gradle -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - warn ( ) { - echo "$*" + echo "${PROGNAME}: $*" } die ( ) { - echo - echo "$*" - echo + warn "$*" exit 1 } + # OS specific support (must be 'true' or 'false'). cygwin=false msys=false @@ -83,31 +79,12 @@ if [ -z "$JAVACMD" ] ; then fi fi if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." + die "JAVA_HOME is not defined correctly, can not execute: $JAVACMD" fi if [ -z "$JAVA_HOME" ] ; then warn "JAVA_HOME environment variable is not set" fi -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query businessSystem maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - # For Darwin, add GRADLE_APP_NAME to the JAVA_OPTS as -Xdock:name if $darwin; then JAVA_OPTS="$JAVA_OPTS -Xdock:name=$GRADLE_APP_NAME" @@ -160,7 +137,7 @@ fi GRADLE_APP_BASE_NAME=`basename "$0"` -exec "$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \ +"$JAVACMD" $JAVA_OPTS $GRADLE_OPTS \ -classpath "$CLASSPATH" \ -Dorg.gradle.appname="$GRADLE_APP_BASE_NAME" \ -Dorg.gradle.wrapper.properties="$WRAPPER_PROPERTIES" \
  10. Download patch README.md

    --- 2.0.0~beta2-1/README.md 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/README.md 2012-02-09 20:55:10.000000000 +0000 @@ -1,47 +1,46 @@ -Groovy -=== - -[Groovy][Groovy] is an agile and dynamic language for the Java Virtual Machine. It builds upon the strengths of Java, but has additional power features inspired by languages like Python, Ruby and Smalltalk. Groovy makes modern programming features available to Java developers with almost-zero learning curve as well as supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain. Groovy makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL. It also increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications. Groovy simplifies testing by supporting unit testing and mocking out-of-the-box. Groovy also seamlessly integrates with all existing Java classes and libraries and compiles straight to Java bytecode so you can use it anywhere you can use Java. -[Groovy]: http://groovy.codehaus.org/ - -Building ---- - -To build you will need: - -* [JDK 1.5+](http://www.oracle.com/technetwork/java/javase/downloads) - -Plus one of the following (Gradle will download itself if needed): - -* [Apache Ant 1.7+](http://ant.apache.org) -* [Gradle 0.9.2+](http://gradle.org/) - -For detailed instructions please see: - -* [http://groovy.codehaus.org/Building+Groovy+from+Source](http://groovy.codehaus.org/Building+Groovy+from+Source) - -To build everything using ant (including running tests and creating a complete installation): - - ant install - -To build without running tests or creating OSGi information: - - ant install -DskipTests=true -DskipOsgi=true - -To run tests from gradle (will download gradle the first time): - - gradlew test - -To build from Eclipse: - -* ant install -* ensure that the M2_REPO classpath variable exists and points to the correct place (typically ~/.m2/repository) - * To Change this, go to Preferences -> Java -> Build Path -> Classpath variables -* Project -> Clean... and then build. Should compile with no errors. But if there are errors, then send a message to the groovy users mailing list -* You will *not* be able to run the tests from inside of Eclipse. - -License ---- - -Groovy is licensed under the terms of the [Apache License, Version 2.0][Apache License, Version 2.0]. -[Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html +Groovy +=== + +[Groovy][Groovy] is an agile and dynamic language for the Java Virtual Machine. It builds upon the strengths of Java, but has additional power features inspired by languages like Python, Ruby and Smalltalk. Groovy makes modern programming features available to Java developers with almost-zero learning curve as well as supports Domain-Specific Languages and other compact syntax so your code becomes easy to read and maintain. Groovy makes writing shell and build scripts easy with its powerful processing primitives, OO abilities and an Ant DSL. It also increases developer productivity by reducing scaffolding code when developing web, GUI, database or console applications. Groovy simplifies testing by supporting unit testing and mocking out-of-the-box. Groovy also seamlessly integrates with all existing Java classes and libraries and compiles straight to Java bytecode so you can use it anywhere you can use Java. +[Groovy]: http://groovy.codehaus.org/ + +Building +--- + +To build you will need: + +* [JDK 1.5+](http://www.oracle.com/technetwork/java/javase/downloads) + +Plus one of the following (Gradle will download itself if needed): +* [Apache Ant 1.7+](http://ant.apache.org) +* [Gradle 0.9.2+](http://gradle.org/) + +For detailed instructions please see: + +* [http://groovy.codehaus.org/Building+Groovy+from+Source](http://groovy.codehaus.org/Building+Groovy+from+Source) + +To build everything using ant (including running tests and creating a complete installation): + + ant install + +To build without running tests or creating OSGi information: + + ant install -DskipTests=true -DskipOsgi=true + +To run tests from gradle (will download gradle the first time): + + gradlew test + +To build from Eclipse: + +* ant install +* ensure that the M2_REPO classpath variable exists and points to the correct place (typically ~/.m2/repository) + * To Change this, go to Preferences -> Java -> Build Path -> Classpath variables +* Project -> Clean... and then build. Should compile with no errors. But if there are errors, then send a message to the groovy users mailing list +* You will *not* be able to run the tests from inside of Eclipse. + +License +--- + +Groovy is licensed under the terms of the [Apache License, Version 2.0][Apache License, Version 2.0]. +[Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0.html
  11. Download patch gradle/pomconfigurer.gradle

    --- 2.0.0~beta2-1/gradle/pomconfigurer.gradle 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradle/pomconfigurer.gradle 2012-02-09 20:55:10.000000000 +0000 @@ -23,7 +23,7 @@ project.pomConfigureClosure = { modelVersion '4.0.0' groupId 'org.codehaus.groovy' artifactId 'groovy' - version '1.9.0-beta-2-SNAPSHOT' + version '1.8.6-SNAPSHOT' name 'Groovy' description 'Groovy: A powerful, dynamic language for the JVM' url 'http://groovy.codehaus.org/' @@ -39,6 +39,7 @@ project.pomConfigureClosure = { organization 'SpringSource' roles { role 'Project Manager' + role 'Despot' role 'Developer' } } @@ -188,6 +189,7 @@ project.pomConfigureClosure = { email 'blackdrag@gmx.org' roles { role 'Developer' + role 'Despot' } } developer { @@ -233,6 +235,7 @@ project.pomConfigureClosure = { organization 'ASERT, Australia' roles { role 'Developer' + role 'Despot' } } developer { @@ -306,6 +309,14 @@ project.pomConfigureClosure = { role 'Developer' } } + developer { + id 'melix' + name 'Cédric Champeau' + email 'cedric.champeau@gmail.com' + roles { + role 'Developer' + } + } } contributors { contributor { @@ -443,14 +454,17 @@ project.pomConfigureClosure = { name 'Adam Murdoch' } contributor { - name 'Cédric Champeau' - } - contributor { name 'David Durham' } contributor { name 'Daniel Henrique Alves Lima' } + contributor { + name 'John Wagenleitner' + } + contributor { + name 'Colin Harrington' + } } mailingLists { mailingList { @@ -466,6 +480,13 @@ project.pomConfigureClosure = { archive 'http://dir.gmane.org/gmane.comp.lang.groovy.user' } } + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } scm { connection 'scm:svn:http://svn.groovy.codehaus.org/browse/groovy/trunk/groovy/groovy-core' developerConnection 'scm:svn:https://${maven.username}@svn.groovy.codehaus.org/browse/groovy/trunk/groovy/groovy-core' @@ -558,4 +579,4 @@ project.pomConfigureClosure = { } } } -} \ No newline at end of file +}
  12. Download patch src/main/groovy/transform/ToString.java

    --- 2.0.0~beta2-1/src/main/groovy/transform/ToString.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/transform/ToString.java 2012-02-09 20:55:10.000000000 +0000 @@ -76,8 +76,11 @@ import java.lang.annotation.Target; * <pre> * AgedThing(age:5, super:NamedThing(Lassie)) * </pre> + * {@code @ToString} can also be used in conjunction with {@code @Canonical} and {@code @Immutable}. * * @author Paul King + * @see Immutable + * @see Canonical * @since 1.8.0 */ @java.lang.annotation.Documented
  13. Download patch src/main/groovy/lang/Binding.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/Binding.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/Binding.java 2012-02-09 20:55:10.000000000 +0000 @@ -22,6 +22,7 @@ import java.util.Map; * Represents the variable bindings of a script which can be altered * from outside the script object or created outside of a script and passed * into it. + * * <p> Binding instances are not supposed to be used in a multithreaded context. * * @author <a href="mailto:james@coredevelopers.net">James Strachan</a> @@ -75,6 +76,15 @@ public class Binding extends GroovyObjec variables = new LinkedHashMap(); variables.put(name, value); } + + /** + * Simple check for whether the binding contains a particular variable or not. + * + * @param name the name of the variable to check for + */ + public boolean hasVariable(String name) { + return variables != null && variables.containsKey(name); + } public Map getVariables() { if (variables == null) @@ -107,5 +117,5 @@ public class Binding extends GroovyObjec setVariable(property, newValue); } } - + }
  14. Download patch src/main/groovy/json/JsonOutput.groovy

    --- 2.0.0~beta2-1/src/main/groovy/json/JsonOutput.groovy 2011-12-16 05:24:20.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/json/JsonOutput.groovy 2012-01-24 20:27:40.000000000 +0000 @@ -139,10 +139,12 @@ class JsonOutput { * @return a JSON object representation for a map */ static String toJson(Map m) { - if(m.containsKey(null)) { - throw new IllegalArgumentException('Null key for a Map not allowed') - } - "{" + m.collect { k, v -> toJson(k.toString()) + ':' + toJson(v) }.join(',') + "}" + "{" + m.collect { k, v -> + if (k == null) { + throw new IllegalArgumentException('Null key for a Map not allowed') + } + toJson(k.toString()) + ':' + toJson(v) + }.join(',') + "}" } /**
  15. Download patch .gradle/1.0-milestone-6/outputFileStates/cache.properties.lock

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/outputFileStates/cache.properties.lock 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/outputFileStates/cache.properties.lock 2012-01-27 14:59:06.000000000 +0000 @@ -0,0 +1 @@ + \ No newline at end of file Binary files 2.0.0~beta2-1/.gradle/1.0-milestone-6/taskArtifacts/cache.bin and 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/taskArtifacts/cache.bin differ
  16. Download patch .gradle/1.0-milestone-6/fileSnapshots/cache.properties.lock

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/fileSnapshots/cache.properties.lock 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/fileSnapshots/cache.properties.lock 2012-01-27 14:59:06.000000000 +0000 @@ -0,0 +1 @@ + \ No newline at end of file Binary files 2.0.0~beta2-1/.gradle/1.0-milestone-6/outputFileStates/cache.bin and 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/outputFileStates/cache.bin differ
  17. Download patch src/main/groovy/lang/MetaObjectProtocol.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/MetaObjectProtocol.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/MetaObjectProtocol.java 2012-02-09 20:55:10.000000000 +0000 @@ -111,7 +111,7 @@ public interface MetaObjectProtocol { * argument values to establish the chosen MetaMethod * * @param name The name of the MetaMethod - * @param args Array containing - 1) the argument values (using which their types are then inferred), or 2) the corresponding argument types + * @param args Array containing - 1) the argument values (using which their types are then inferred), or 2) the corresponding argument types * @return A MetaMethod or null if it doesn't exist */ MetaMethod getMetaMethod(String name, Object[] args);
  18. Download patch .pc/0003-disable-bnd.diff.patch/build.xml
  19. Download patch src/main/groovy/util/GroovyLog.java

    --- 2.0.0~beta2-1/src/main/groovy/util/GroovyLog.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/GroovyLog.java 2012-02-09 20:55:10.000000000 +0000 @@ -0,0 +1,83 @@ +/* + * Copyright 2003-2007 the original author or authors. + * + * 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 under the License. + */ +package groovy.util; + +import groovy.lang.GroovyObjectSupport; + +import org.codehaus.groovy.runtime.DefaultGroovyMethods; + +// +// FIXME: This class really isn't all that useful. It would be *much* better if there +// was a simple log API in groovy to dynamically switch to the logging facade that +// is actually installed. +// + +/** + * Represents an arbitrary logging service. By default this outputs to + * System.out though derivations of this class could log to Jakarta Commons Logging + * or log4j or JDK 1.5 logging etc + * + * @author <a href="mailto:james@coredevelopers.net">James Strachan</a> + * @version $Revision$ + */ +@Deprecated +public class GroovyLog extends GroovyObjectSupport { + + String prefix; + + /** + * Factory method to create new instances + */ + public static GroovyLog newInstance(Class aClass) { + return new GroovyLog(aClass); + } + + public GroovyLog() { + this(""); + } + + public GroovyLog(Class type) { + this(type.getName()); + } + + public GroovyLog(Object obj) { + this(obj.getClass()); + } + + public GroovyLog(String prefix) { + // + // FIXME: This kinda sucks as a default... shouldn't tack on any [ or : muck + // + + this.prefix = (prefix != null && prefix.length() > 0) ? "[" + prefix + ":" : "["; + } + + public Object invokeMethod(String name, Object args) { + if (args != null && args.getClass().isArray()) { + args = DefaultGroovyMethods.join((Object[])args, ","); + } + + // + // FIXME: This kinda sucks as an output format, should probably ucase name and then + // warp prefix in [] and then output the args. Basically what the SimpleLog + // does in JCL. + // + + System.out.println(prefix + name + "] " + args); + + return null; + } +}
  20. Download patch src/bin/groovysh

    --- 2.0.0~beta2-1/src/bin/groovysh 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/bin/groovysh 2012-02-09 20:55:10.000000000 +0000 @@ -30,4 +30,8 @@ DIRNAME=`dirname "$PRG"` . "$DIRNAME/startGroovy" -startGroovy org.codehaus.groovy.tools.shell.Main "$@" +if [ "x$OLDSHELL" != "x" ]; then + startGroovy groovy.ui.InteractiveShell "$@" +else + startGroovy org.codehaus.groovy.tools.shell.Main "$@" +fi
  21. Download patch debian/rules

    --- 2.0.0~beta2-1/debian/rules 2011-10-15 02:55:46.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/debian/rules 2012-03-15 13:12:40.000000000 +0000 @@ -5,7 +5,6 @@ include /usr/share/cdbs/1/class/ant.mk PACKAGE := $(DEB_SOURCE_PACKAGE) VERSION := $(DEB_UPSTREAM_VERSION) -DEB_UPSTREAM_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION)| sed 's/~beta/-beta-/') JAVA_HOME := /usr/lib/jvm/default-java DEB_ANT_BUILDFILE := build.xml DEB_ANT_BUILD_TARGET := install doc @@ -15,15 +14,18 @@ DEB_JARS := ant mockobjects- asm3-util asm3-tree asm3-analysis ivy bnd qdox jarjar jansi ant-nodeps API_DOCS := target/html/api +# Ubuntu hack to work around +isreally to backout 2.0.0 +UBUNTU_UPSTREAM_VERSION := $(shell echo $(DEB_UPSTREAM_VERSION) | sed 's/.*isreally//') + binary-post-install/$(PACKAGE):: chmod a+x debian/groovy/usr/share/groovy/bin/* sed -i \ -e"1s,.*,#!/bin/sh," \ debian/groovy/usr/share/groovy/bin/startGroovy - mh_installpoms -p$(PACKAGE) + mh_installpoms -p$(PACKAGE) # without bnd: - mh_installjar -p$(PACKAGE) -dusr/share/groovy/lib/groovy-$(DEB_UPSTREAM_VERSION).jar -l pom.xml target/dist/groovy.jar - mh_installjar -p$(PACKAGE) -dusr/share/groovy/embeddable/groovy-all-$(DEB_UPSTREAM_VERSION).jar -l target/groovy-all.pom target/dist/groovy-all.jar + mh_installjar -p$(PACKAGE) -dusr/share/groovy/lib/groovy-$(UBUNTU_UPSTREAM_VERSION).jar -l pom.xml target/dist/groovy.jar + mh_installjar -p$(PACKAGE) -dusr/share/groovy/embeddable/groovy-all-$(UBUNTU_UPSTREAM_VERSION).jar -l target/groovy-all.pom target/dist/groovy-all.jar # with bnd: #mh_installjar -p$(PACKAGE) -dusr/share/groovy/lib/groovy-$(DEB_UPSTREAM_VERSION).jar -l pom.xml target/install/lib/groovy-$(DEB_UPSTREAM_VERSION).jar #mh_installjar -p$(PACKAGE) -dusr/share/groovy/embeddable/groovy-all-$(DEB_UPSTREAM_VERSION).jar -l target/groovy-all.pom target/install/embeddable/groovy-all-$(DEB_UPSTREAM_VERSION).jar
  22. Download patch src/main/groovy/servlet/AbstractHttpServlet.java

    --- 2.0.0~beta2-1/src/main/groovy/servlet/AbstractHttpServlet.java 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/servlet/AbstractHttpServlet.java 2012-02-06 15:05:22.000000000 +0000 @@ -296,13 +296,20 @@ public abstract class AbstractHttpServle /** * Parses the http request for the real script or template source file. - * - * @param request the http request to analyze - * @return a file object using an absolute file path name + * + * @param request + * the http request to analyze + * @return a file object using an absolute file path name, or <code>null</code> if the + * servlet container cannot translate the virtual path to a real + * path for any reason (such as when the content is being made + * available from a .war archive). */ protected File getScriptUriAsFile(HttpServletRequest request) { String uri = getScriptUri(request); String real = servletContext.getRealPath(uri); + if (real == null) { + return null; + } return new File(real).getAbsoluteFile(); }
  23. Download patch src/main/groovy/beans/BindableASTTransformation.java

    --- 2.0.0~beta2-1/src/main/groovy/beans/BindableASTTransformation.java 2011-12-06 17:28:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/beans/BindableASTTransformation.java 2012-02-06 15:05:22.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2008-2009 the original author or authors. + * Copyright 2008-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -267,9 +267,9 @@ public class BindableASTTransformation i /** * Snoops through the declaring class and all parents looking for methods - * void addPropertyChangeListener(PropertyChangeListener), - * void removePropertyChangeListener(PropertyChangeListener), and - * void firePropertyChange(String, Object, Object). If any are defined all + * <code>void addPropertyChangeListener(PropertyChangeListener)</code>, + * <code>void removePropertyChangeListener(PropertyChangeListener)</code>, and + * <code>void firePropertyChange(String, Object, Object)</code>. If any are defined all * must be defined or a compilation error results. * * @param declaringClass the class to search @@ -316,14 +316,18 @@ public class BindableASTTransformation i * Adds the necessary field and methods to support property change support. * <p/> * Adds a new field: + * <pre> * <code>protected final java.beans.PropertyChangeSupport this$PropertyChangeSupport = new java.beans.PropertyChangeSupport(this)</code>" + * </pre> * <p/> * Also adds support methods: + * <pre> * <code>public void addPropertyChangeListener(java.beans.PropertyChangeListener)</code> * <code>public void addPropertyChangeListener(String, java.beans.PropertyChangeListener)</code> * <code>public void removePropertyChangeListener(java.beans.PropertyChangeListener)</code> * <code>public void removePropertyChangeListener(String, java.beans.PropertyChangeListener)</code> * <code>public java.beans.PropertyChangeListener[] getPropertyChangeListeners()</code> + * </pre> * * @param declaringClass the class to which we add the support field and methods */
  24. Download patch benchmark/bench/ary.groovy

    --- 2.0.0~beta2-1/benchmark/bench/ary.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/benchmark/bench/ary.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -9,10 +9,10 @@ public class ary { - public static void main(String[] args) { + public static void main(String args[]) { int i, j, k, n = Integer.parseInt(args[0]); - int[] x = new int[n]; - int[] y = new int[n]; + int x[] = new int[n]; + int y[] = new int[n]; for (i = 0; i < n; i++) x[i] = i + 1;
  25. Download patch debian/control

    --- 2.0.0~beta2-1/debian/control 2011-10-15 02:55:46.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/debian/control 2012-03-15 13:06:56.000000000 +0000 @@ -1,7 +1,8 @@ Source: groovy Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> DM-Upload-Allowed: yes Uploaders: Torsten Werner <twerner@debian.org>, Varun Hiremath <varun@debian.org>, Ludovic Claude <ludovic.claude@laposte.net>, Miguel Landaeta <miguel@miguel.cc> Build-Depends: debhelper (>= 7), cdbs @@ -12,8 +13,8 @@ Build-Depends-Indep: maven-repo-helper, tofrodos, ivy, libqdox-java, libjarjar-java, libjansi-java Standards-Version: 3.9.2 Homepage: http://groovy.codehaus.org/ -Vcs-Svn: svn://svn.debian.org/svn/pkg-java/branches/groovy/1.9 -Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/branches/groovy/1.9 +Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/groovy/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/groovy/ Package: groovy Architecture: all
  26. Download patch build.gradle

    --- 2.0.0~beta2-1/build.gradle 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/build.gradle 2012-02-09 20:55:10.000000000 +0000 @@ -27,12 +27,12 @@ configurations { dependencies { groovy files("$buildDir/classes") - groovy "asm:asm:3.3.1" + groovy "asm:asm:3.2" groovy "antlr:antlr:2.7.7" - groovy "asm:asm-commons:3.3.1" - groovy "asm:asm-util:3.3.1" - groovy "asm:asm-analysis:3.3.1" - groovy "asm:asm-tree:3.3.1" + groovy "asm:asm-commons:3.2" + groovy "asm:asm-util:3.2" + groovy "asm:asm-analysis:3.2" + groovy "asm:asm-tree:3.2" compile("bsf:bsf:2.4.0") { exclude(group: 'commons-logging', module: 'commons-logging') @@ -76,7 +76,7 @@ dependencies { // todo this was provided compile "org.livetribe:livetribe-jsr223:2.0.6" - tools "com.googlecode.jarjar:jarjar:1.1" + tools "com.google.code:jarjar:1.1" tools("checkstyle:checkstyle:4.4") { exclude(module: 'junit') } @@ -86,7 +86,7 @@ dependencies { exclude(module: 'asm') exclude(module: 'ant') } - tools "asm:asm:3.3.1" + tools "asm:asm:3.2" tools "com.thoughtworks.qdox:qdox:1.12" tools "biz.aQute:bnd:0.0.401"
  27. Download patch src/main/groovy/xml/MarkupBuilder.java

    --- 2.0.0~beta2-1/src/main/groovy/xml/MarkupBuilder.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/xml/MarkupBuilder.java 2012-02-09 20:55:10.000000000 +0000 @@ -310,7 +310,40 @@ public class MarkupBuilder extends Build protected Object getName(String methodName) { return super.getName(methodName); } - + + /** + * Returns a String with special XML characters escaped as entities so that + * output XML is valid. Escapes the following characters as corresponding + * entities: + * <ul> + * <li>\' as &amp;apos;</li> + * <li>&amp; as &amp;amp;</li> + * <li>&lt; as &amp;lt;</li> + * <li>&gt; as &amp;gt;</li> + * </ul> + * + * @param value to be searched and replaced for XML special characters. + * @return value with XML characters escaped + * @see #escapeXmlValue(String, boolean) + * @deprecated + */ + protected String transformValue(String value) { + // & has to be checked and replaced before others + if (value.matches(".*&.*")) { + value = value.replaceAll("&", "&amp;"); + } + if (value.matches(".*\\'.*")) { + value = value.replaceAll("\'", "&apos;"); + } + if (value.matches(".*<.*")) { + value = value.replaceAll("<", "&lt;"); + } + if (value.matches(".*>.*")) { + value = value.replaceAll(">", "&gt;"); + } + return value; + } + /** * Escapes a string so that it can be used directly as an XML * attribute value.
  28. Download patch gradlew.bat

    --- 2.0.0~beta2-1/gradlew.bat 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradlew.bat 2012-02-09 20:55:10.000000000 +0000 @@ -5,6 +5,10 @@ @rem ## @rem ########################################################################## +@rem +@rem $Revision: 10602 $ $Date: 2008-01-25 02:49:54 +0100 (ven., 25 janv. 2008) $ +@rem + @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal @@ -15,29 +19,69 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=.\ -@rem Find java.exe -set JAVA_EXE=java.exe -if not defined JAVA_HOME goto init - -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init +@rem Determine the command interpreter to execute the "CD" later +set COMMAND_COM="cmd.exe" +if exist "%SystemRoot%\system32\cmd.exe" set COMMAND_COM="%SystemRoot%\system32\cmd.exe" +if exist "%SystemRoot%\command.com" set COMMAND_COM="%SystemRoot%\command.com" + +@rem Use explicit find.exe to prevent cygwin and others find.exe from being used +set FIND_EXE="find.exe" +if exist "%SystemRoot%\system32\find.exe" set FIND_EXE="%SystemRoot%\system32\find.exe" +if exist "%SystemRoot%\command\find.exe" set FIND_EXE="%SystemRoot%\command\find.exe" + +:check_JAVA_HOME +@rem Make sure we have a valid JAVA_HOME +if not "%JAVA_HOME%" == "" goto have_JAVA_HOME echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo ERROR: Environment variable JAVA_HOME has not been set. echo. echo Please set the JAVA_HOME variable in your environment to match the echo location of your Java installation. echo. goto end +:have_JAVA_HOME +@rem Validate JAVA_HOME +%COMMAND_COM% /C DIR "%JAVA_HOME%" 2>&1 | %FIND_EXE% /I /C "%JAVA_HOME%" >nul +if not errorlevel 1 goto init + +echo. +echo ERROR: JAVA_HOME might be set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation if there are problems. +echo. + :init +@rem get name of script to launch with full path @rem Get command-line arguments, handling Windowz variants +SET _marker=%JAVA_HOME: =% +@rem IF NOT "%_marker%" == "%JAVA_HOME%" ECHO JAVA_HOME "%JAVA_HOME%" contains spaces. Please change to a location without spaces if this causes problems. if not "%OS%" == "Windows_NT" goto win9xME_args if "%eval[2+2]" == "4" goto 4NT_args +IF "%_marker%" == "%JAVA_HOME%" goto :win9xME_args + +set _FIXPATH= +call :fixpath "%JAVA_HOME%" +set JAVA_HOME=%_FIXPATH:~1% + +goto win9xME_args + +:fixpath +if not %1.==. ( +for /f "tokens=1* delims=;" %%a in (%1) do ( +call :shortfilename "%%a" & call :fixpath "%%b" +) +) +goto :EOF +:shortfilename +for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi +goto :EOF + + :win9xME_args @rem Slurp the command line arguments. set CMD_LINE_ARGS= @@ -59,10 +103,10 @@ set CMD_LINE_ARGS=%$ set STARTER_MAIN_CLASS=org.gradle.wrapper.GradleWrapperMain set CLASSPATH=%DIRNAME%\gradle\wrapper\gradle-wrapper.jar set WRAPPER_PROPERTIES=%DIRNAME%\gradle\wrapper\gradle-wrapper.properties +set JAVA_EXE=%JAVA_HOME%\bin\java.exe set GRADLE_OPTS=%JAVA_OPTS% %GRADLE_OPTS% -Dorg.gradle.wrapper.properties="%WRAPPER_PROPERTIES%" -@rem Execute Gradle "%JAVA_EXE%" %GRADLE_OPTS% -classpath "%CLASSPATH%" %STARTER_MAIN_CLASS% %CMD_LINE_ARGS% :end
  29. Download patch src/main/groovy/swing/factory/WidgetFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/WidgetFactory.groovy 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/WidgetFactory.groovy 2012-02-07 18:53:16.000000000 +0000 @@ -18,6 +18,8 @@ package groovy.swing.factory import java.awt.Component import java.awt.Window +import javax.swing.JComponent +import static groovy.swing.factory.LayoutFactory.DEFAULT_DELEGATE_PROPERTY_CONSTRAINT public class WidgetFactory extends AbstractFactory { @@ -52,6 +54,9 @@ public class WidgetFactory extends Abstr def constraints = builder.context.constraints if (constraints != null) { LayoutFactory.getLayoutTarget(parent).add(child, constraints) + if (child instanceof JComponent) { + child.putClientProperty(DEFAULT_DELEGATE_PROPERTY_CONSTRAINT, constraints) + } builder.context.remove('constraints') } else { LayoutFactory.getLayoutTarget(parent).add(child)
  30. Download patch src/main/groovy/lang/MetaClassImpl.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/MetaClassImpl.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/MetaClassImpl.java 2012-02-09 20:55:10.000000000 +0000 @@ -76,21 +76,9 @@ import java.lang.reflect.Modifier; import java.lang.reflect.Proxy; import java.net.URL; import java.security.AccessController; -import java.security.PrivilegedAction; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.Collections; -import java.util.Comparator; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; /** * Allows methods to be dynamically added to existing classes at runtime @@ -119,6 +107,11 @@ public class MetaClassImpl implements Me private static final Class[] METHOD_MISSING_ARGS = new Class[]{String.class, Object.class}; private static final Class[] GETTER_MISSING_ARGS = new Class[]{String.class}; private static final Class[] SETTER_MISSING_ARGS = METHOD_MISSING_ARGS; + private static final Comparator<CachedClass> CACHED_CLASS_NAME_COMPARATOR = new Comparator<CachedClass>() { + public int compare(final CachedClass o1, final CachedClass o2) { + return o1.getName().compareTo(o2.getName()); + } + }; protected final Class theClass; protected final CachedClass theCachedClass; @@ -878,6 +871,7 @@ public class MetaClassImpl implements Me /** * Invokes the given method on the object. + * TODO: should this be deprecated? If so, we have to propogate to many places. */ public Object invokeMethod(Object object, String methodName, Object[] originalArguments) { return invokeMethod(theClass, object, methodName, originalArguments, false, false); @@ -1368,6 +1362,15 @@ public class MetaClassImpl implements Me } } + /** + * Warning, this method will be removed + * + * @deprecated use invokeConstructor instead + */ + public Object invokeConstructorAt(Class at, Object[] arguments) { + return invokeConstructor(arguments); + } + public Object invokeConstructor(Object[] arguments) { return invokeConstructor(theClass, arguments); } @@ -1933,21 +1936,27 @@ public class MetaClassImpl implements Me * This will build up the property map (Map of MetaProperty objects, keyed on * property name). */ + @SuppressWarnings("unchecked") private void setupProperties(PropertyDescriptor[] propertyDescriptors) { if (theCachedClass.isInterface) { LinkedList<CachedClass> superClasses = new LinkedList<CachedClass>(); superClasses.add(ReflectionCache.OBJECT_CLASS); Set interfaces = theCachedClass.getInterfaces(); - classPropertyIndexForSuper = classPropertyIndex; - final SingleKeyHashMap cPI = classPropertyIndex.getNotNull(theCachedClass); - for (Iterator interfaceIter = interfaces.iterator(); interfaceIter.hasNext();) { - CachedClass iclass = (CachedClass) interfaceIter.next(); - SingleKeyHashMap iPropertyIndex = cPI; + LinkedList<CachedClass> superInterfaces = new LinkedList<CachedClass>(interfaces); + // sort interfaces so that we may ensure a deterministic behaviour in case of + // ambiguous fields (class implementing two interfaces using the same field) + if (superInterfaces.size()>1) { + Collections.sort(superInterfaces, CACHED_CLASS_NAME_COMPARATOR); + } + + SingleKeyHashMap iPropertyIndex = classPropertyIndex.getNotNull(theCachedClass); + for (CachedClass iclass : superInterfaces) { + SingleKeyHashMap sPropertyIndex = classPropertyIndex.getNotNull(iclass); + copyNonPrivateFields(sPropertyIndex, iPropertyIndex); addFields(iclass, iPropertyIndex); - classPropertyIndex.put(iclass, iPropertyIndex); } - classPropertyIndex.put(ReflectionCache.OBJECT_CLASS, cPI); + addFields(theCachedClass, iPropertyIndex); applyPropertyDescriptors(propertyDescriptors); applyStrayPropertyMethods(superClasses, classPropertyIndex, true); @@ -1955,7 +1964,12 @@ public class MetaClassImpl implements Me makeStaticPropertyIndex(); } else { LinkedList<CachedClass> superClasses = getSuperClasses(); - Set interfaces = theCachedClass.getInterfaces(); + LinkedList<CachedClass> interfaces = new LinkedList<CachedClass>(theCachedClass.getInterfaces()); + // sort interfaces so that we may ensure a deterministic behaviour in case of + // ambiguous fields (class implementing two interfaces using the same field) + if (interfaces.size()>1) { + Collections.sort(interfaces, CACHED_CLASS_NAME_COMPARATOR); + } // if this an Array, then add the special read-only "length" property if (theCachedClass.isArray) { @@ -1964,7 +1978,7 @@ public class MetaClassImpl implements Me classPropertyIndex.put(theCachedClass, map); } - inheritStaticInterfaceFields(superClasses, interfaces); + inheritStaticInterfaceFields(superClasses, new LinkedHashSet(interfaces)); inheritFields(superClasses); applyPropertyDescriptors(propertyDescriptors); @@ -2924,6 +2938,10 @@ public class MetaClassImpl implements Me Method[] listenerMethods = descriptor.getListenerMethods(); for (Method listenerMethod : listenerMethods) { final MetaMethod metaMethod = CachedMethod.find(descriptor.getAddListenerMethod()); + // GROOVY-5202 + // there might be a non public listener of some kind + // we skip that here + if (metaMethod==null) continue; addToAllMethodsIfPublic(metaMethod); String name = listenerMethod.getName(); if (listeners.containsKey(name)) { @@ -3307,6 +3325,13 @@ public class MetaClassImpl implements Me } /** + * @deprecated use pickMethod instead + */ + protected MetaMethod retrieveMethod(String methodName, Class[] arguments) { + return pickMethod(methodName, arguments); + } + + /** * remove all method call cache entries. This should be done if a * method is added during runtime, but not by using a category. */
  31. Download patch src/main/groovy/text/GStringTemplateEngine.java

    --- 2.0.0~beta2-1/src/main/groovy/text/GStringTemplateEngine.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/text/GStringTemplateEngine.java 2012-02-09 20:55:10.000000000 +0000 @@ -177,12 +177,12 @@ public class GStringTemplateEngine exten templateExpressions.append("}.asWritable()}"); - final GroovyClassLoader loader = parentLoader instanceof GroovyClassLoader?(GroovyClassLoader)parentLoader:( + final GroovyClassLoader loader = (GroovyClassLoader) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return new GroovyClassLoader(parentLoader); } - })); + }); final Class groovyClass; try { groovyClass = loader.parseClass(new GroovyCodeSource(templateExpressions.toString(), "GStringTemplateScript" + counter++ + ".groovy", "x"));
  32. Download patch src/main/groovy/xml/XmlUtil.java

    --- 2.0.0~beta2-1/src/main/groovy/xml/XmlUtil.java 2011-12-06 17:28:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/xml/XmlUtil.java 2012-02-06 15:03:26.000000000 +0000 @@ -15,6 +15,7 @@ */ package groovy.xml; +import groovy.lang.GroovyRuntimeException; import groovy.lang.Writable; import groovy.util.Node; import groovy.util.XmlNodePrinter; @@ -253,7 +254,7 @@ public class XmlUtil { transformer.transform(source, target); } catch (TransformerException e) { - // ignore + throw new GroovyRuntimeException(e.getMessage()); } }
  33. Download patch src/main/groovy/lang/GroovyClassLoader.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/GroovyClassLoader.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/GroovyClassLoader.java 2012-02-09 20:55:10.000000000 +0000 @@ -147,6 +147,18 @@ public class GroovyClassLoader extends U } /** + * Loads the given class node returning the implementation Class + * + * @param classNode + * @return a class + * @deprecated + */ + public Class defineClass(ClassNode classNode, String file) { + //return defineClass(classNode, file, "/groovy/defineClass"); + throw new DeprecationException("the method GroovyClassLoader#defineClass(ClassNode, String) is no longer used and removed"); + } + + /** * Loads the given class node returning the implementation Class. * <p/> * WARNING: this compilation is not synchronized @@ -213,6 +225,17 @@ public class GroovyClassLoader extends U Math.abs(text.hashCode()) + ".groovy"); } + /** + * Parses the given character stream into a Java class capable of being run + * + * @param in an InputStream + * @return the main class defined in the given script + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + public Class parseClass(InputStream in) throws CompilationFailedException { + return parseClass(in, generateScriptName()); + } + public synchronized String generateScriptName() { scriptNameCounter++; return "script" + scriptNameCounter + ".groovy"; @@ -329,6 +352,27 @@ public class GroovyClassLoader extends U return ret; } + /** + * expands the classpath + * + * @param pathList an empty list that will contain the elements of the classpath + * @param classpath the classpath specified as a single string + * @deprecated + */ + protected void expandClassPath(List pathList, String base, String classpath, boolean isManifestClasspath) { + throw new DeprecationException("the method groovy.lang.GroovyClassLoader#expandClassPath(List,String,String,boolean) is no longer used internally and removed"); + } + + /** + * A helper method to allow bytecode to be loaded. spg changed name to + * defineClass to make it more consistent with other ClassLoader methods + * + * @deprecated + */ + protected Class defineClass(String name, byte[] bytecode, ProtectionDomain domain) { + throw new DeprecationException("the method groovy.lang.GroovyClassLoader#defineClass(String,byte[],ProtectionDomain) is no longer used internally and removed"); + } + protected PermissionCollection getPermissions(CodeSource codeSource) { PermissionCollection perms; try { @@ -832,6 +876,10 @@ public class GroovyClassLoader extends U return ret; } + private URL getSourceFile(String name) { + return getSourceFile(name, config.getDefaultScriptExtension()); + } + /** * Decides if the given source is newer than a class. *
  34. Download patch build.properties

    --- 2.0.0~beta2-1/build.properties 2011-12-23 19:01:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/build.properties 2012-02-09 22:26:34.000000000 +0000 @@ -1,6 +1,6 @@ -groovyVersion = 2.0.0-beta-2 +groovyVersion = 1.8.6 # bundle version format: major('.'minor('.'micro('.'qualifier)?)?)? (first 3 only digits) -groovyBundleVersion = 2.0.0.beta-2 +groovyBundleVersion = 1.8.6 # Many people have reported problems testing UberTestCaseGroovySourceSubPackages, others have no difficulties with the default # values ant junit task uses. The decision has been taken to provide the values to try and cause the least
  35. Download patch src/main/groovy/time/BaseDuration.java

    --- 2.0.0~beta2-1/src/main/groovy/time/BaseDuration.java 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/time/BaseDuration.java 2012-02-07 18:53:16.000000000 +0000 @@ -27,7 +27,7 @@ import java.util.ArrayList; * @see Duration * @author John Wilson tug@wilson.co.uk */ -public abstract class BaseDuration { +public abstract class BaseDuration implements Comparable<BaseDuration> { protected final int years; protected final int months; protected final int days; @@ -118,6 +118,10 @@ public abstract class BaseDuration { public abstract From getFrom(); + public int compareTo(BaseDuration otherDuration) { + return Long.signum(toMilliseconds() - otherDuration.toMilliseconds()); + } + public abstract static class From { public abstract Date getNow();
  36. Download patch src/main/groovy/lang/PackageScope.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/PackageScope.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/PackageScope.java 2012-02-09 20:55:10.000000000 +0000 @@ -0,0 +1,42 @@ +/* + * Copyright 2008-2010 the original author or authors. + * + * 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 under the License. + */ + +package groovy.lang; + +import org.codehaus.groovy.transform.GroovyASTTransformationClass; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Class or field annotation used for turning off Groovy's auto property + * conversion of default or package scoped fields. Place it on the field(s) + * of interest or on the class to apply for all package-scoped fields. + * + * This transformation is normally only used in conjunction with a third-party + * library or framework which requires package scoping. + * + * @author Paul King + * @deprecated use groovy.transform.PackageScope + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD}) +@GroovyASTTransformationClass("org.codehaus.groovy.transform.PackageScopeASTTransformation") +@Deprecated +public @interface PackageScope { +} \ No newline at end of file
  37. Download patch src/main/groovy/util/ConfigObject.groovy

    --- 2.0.0~beta2-1/src/main/groovy/util/ConfigObject.groovy 2011-12-16 05:24:20.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/ConfigObject.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -101,7 +101,7 @@ class ConfigObject extends LinkedHashMap * @return The result of the merge */ Map merge(ConfigObject other) { - return doMerge(this,other) + return merge(this,other) } @@ -128,7 +128,7 @@ class ConfigObject extends LinkedHashMap return props } - private doMerge(Map config, Map other) { + private merge(Map config, Map other) { for(entry in other) { def configEntry = config[entry.key] @@ -139,7 +139,7 @@ class ConfigObject extends LinkedHashMap else { if(configEntry instanceof Map && configEntry.size() > 0 && entry.value instanceof Map) { // recur - doMerge(configEntry, entry.value) + merge(configEntry, entry.value) } else { config[entry.key] = entry.value
  38. Download patch src/main/groovy/swing/factory/RootPaneContainerFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/RootPaneContainerFactory.groovy 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/RootPaneContainerFactory.groovy 2012-02-07 18:53:16.000000000 +0000 @@ -18,7 +18,9 @@ package groovy.swing.factory import java.awt.Component import java.awt.Window +import javax.swing.JComponent import javax.swing.JButton +import static groovy.swing.factory.LayoutFactory.DEFAULT_DELEGATE_PROPERTY_CONSTRAINT abstract class RootPaneContainerFactory extends AbstractFactory { @@ -33,6 +35,9 @@ abstract class RootPaneContainerFactory def constraints = builder.context.constraints if (constraints != null) { parent.contentPane.add(child, constraints) + if (child instanceof JComponent) { + child.putClientProperty(DEFAULT_DELEGATE_PROPERTY_CONSTRAINT, constraints) + } builder.context.remove('constraints') } else { parent.contentPane.add(child)
  39. Download patch debian/orig-tar.sh

    --- 2.0.0~beta2-1/debian/orig-tar.sh 2011-10-15 02:55:46.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/debian/orig-tar.sh 2012-03-15 13:06:56.000000000 +0000 @@ -2,8 +2,7 @@ # called by uscan with '--upstream-version' <version> <file> TAR=../groovy_$2.orig.tar.gz -VERSION=$(echo $2 | sed 's/~beta/-beta-/g') -DIR=groovy-$VERSION +DIR=groovy-$2 # clean up the upstream tarball unzip $3
  40. Download patch .gradle/1.0-milestone-6/fileHashes/cache.properties.lock

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/fileHashes/cache.properties.lock 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/fileHashes/cache.properties.lock 2012-01-27 14:59:06.000000000 +0000 @@ -0,0 +1 @@ + \ No newline at end of file Binary files 2.0.0~beta2-1/.gradle/1.0-milestone-6/fileSnapshots/cache.bin and 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/fileSnapshots/cache.bin differ
  41. Download patch debian/patches/0003-disable-bnd.diff.patch

    --- 2.0.0~beta2-1/debian/patches/0003-disable-bnd.diff.patch 2011-10-15 02:55:46.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/debian/patches/0003-disable-bnd.diff.patch 2012-03-15 13:06:56.000000000 +0000 @@ -11,13 +11,12 @@ diff --git a/build.xml b/build.xml index ab54309..e97dfce 100644 --- a/build.xml +++ b/build.xml -@@ -635,7 +635,7 @@ $Date: 2010-04-02 16:02:23 +0200 (Fr, 02. Apr 2010) $ - </move> - </target> - -- <target name="install" depends="createJars,updateJarsForOsgi,skipOsgi" unless="testFailed" -+ <target name="install" depends="createJars,skipOsgi" unless="testFailed" - description="Create an installation hierarchy in target/install."> - - <!-- --- +@@ -644,7 +644,7 @@ + </move> + </target> + +- <target name="install" depends="createJars,updateJarsForOsgi,skipOsgi" unless="testFailed" ++ <target name="install" depends="createJars,skipOsgi" unless="testFailed" + description="Create an installation hierarchy in target/install."> + + <!--
  42. Download patch .gradle/1.0-milestone-6/fileSnapshots/cache.properties

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/fileSnapshots/cache.properties 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/fileSnapshots/cache.properties 2012-01-27 14:18:30.000000000 +0000 @@ -0,0 +1 @@ +#Fri Jan 27 09:48:29 CET 2012
  43. Download patch src/main/groovy/transform/Immutable.java

    --- 2.0.0~beta2-1/src/main/groovy/transform/Immutable.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/transform/Immutable.java 2012-02-09 20:55:10.000000000 +0000 @@ -87,7 +87,13 @@ import java.lang.annotation.Target; * </ul> * <p/> * Immutable classes are particularly useful for functional and concurrent styles of programming - * and for use as key values within maps. + * and for use as key values within maps. If you want similar functionality to what this annotation + * provides but don't need immutability then consider using {@code @Canonical}. + * <p/> + * Customising behaviour: + * <p/> + * You can customise the toString() method provided for you by {@code @Immutable} + * by also adding the {@code @ToString} annotation to your class definition. * <p/> * Limitations: * <ul> @@ -113,6 +119,8 @@ import java.lang.annotation.Target; * </ul> * * @author Paul King + * @see ToString + * @see Canonical * @since 1.7 */ @java.lang.annotation.Documented
  44. Download patch src/main/groovy/inspect/swingui/TableSorter.java

    --- 2.0.0~beta2-1/src/main/groovy/inspect/swingui/TableSorter.java 2011-12-06 17:28:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/inspect/swingui/TableSorter.java 2012-02-06 15:03:26.000000000 +0000 @@ -193,7 +193,6 @@ space and avoid unnecessary heap allocat } public void tableChanged(TableModelEvent e) { - System.out.println("Sorter: tableChanged"); reallocateIndexes(); super.tableChanged(e);
  45. Download patch src/main/groovy/swing/factory/TableLayoutFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/TableLayoutFactory.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/TableLayoutFactory.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -33,7 +33,7 @@ public class TableLayoutFactory extends public void setParent(FactoryBuilderSupport builder, Object parent, Object child) { if (builder.getParentFactory()) { - builder.getParentFactory().setChild (builder, parent, child); + builder.getParentFactory().setChild (builder, parent, child.getComponent()); } } }
  46. Download patch src/main/groovy/sql/GroovyRowResult.java

    --- 2.0.0~beta2-1/src/main/groovy/sql/GroovyRowResult.java 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/sql/GroovyRowResult.java 2012-02-06 15:05:22.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2007 the original author or authors. + * Copyright 2003-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,20 +47,10 @@ public class GroovyRowResult extends Gro */ public Object getProperty(String property) { try { - Object value = result.get(property); - if (value != null) - return value; - // if property exists and value is null, return null - if (result.containsKey(property)) - return null; - // with some databases/drivers, the columns names are stored uppercase. - String propertyUpper = property.toUpperCase(); - value = result.get(propertyUpper); - if (value != null) - return value; - // if property exists and value is null, return null - if (result.containsKey(propertyUpper)) - return null; + Object key = lookupKeyIgnoringCase(property); + if (key != null) { + return result.get(key); + } throw new MissingPropertyException(property, GroovyRowResult.class); } catch (Exception e) { @@ -68,6 +58,22 @@ public class GroovyRowResult extends Gro } } + private Object lookupKeyIgnoringCase(Object key) { + // try some special cases first for efficiency + if (result.containsKey(key)) + return key; + if (!(key instanceof CharSequence)) + return null; + String keyStr = key.toString(); + for (Object next : result.keySet()) { + if (!(next instanceof String)) + continue; + if (keyStr.equalsIgnoreCase((String)next)) + return next; + } + return null; + } + /** * Retrieve the value of the property by its index. * A negative index will count backwards from the last column. @@ -90,7 +96,7 @@ public class GroovyRowResult extends Gro it.next(); i++; } - return (obj); + return obj; } catch (Exception e) { throw new MissingPropertyException(Integer.toString(index), GroovyRowResult.class, e); @@ -98,12 +104,12 @@ public class GroovyRowResult extends Gro } public String toString() { - return (result.toString()); + return result.toString(); } /* * The following methods are needed for implementing the Map interface. - * They are just delegating the request to the internal LinkedHashMap + * They are mostly delegating the request to the provided Map. */ public void clear() { @@ -111,7 +117,7 @@ public class GroovyRowResult extends Gro } public boolean containsKey(Object key) { - return result.containsKey(key); + return lookupKeyIgnoringCase(key) != null; } public boolean containsValue(Object value) { @@ -129,8 +135,7 @@ public class GroovyRowResult extends Gro public Object get(Object property) { if (property instanceof String) return getProperty((String)property); - else - return null; + return null; } public int hashCode() { @@ -153,8 +158,8 @@ public class GroovyRowResult extends Gro result.putAll(t); } - public Object remove(Object key) { - return result.remove(key); + public Object remove(Object rawKey) { + return result.remove(lookupKeyIgnoringCase(rawKey)); } public int size() {
  47. Download patch .gradle/1.0-milestone-6/taskArtifacts/cache.properties.lock

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/taskArtifacts/cache.properties.lock 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/taskArtifacts/cache.properties.lock 2012-01-27 14:59:06.000000000 +0000 @@ -0,0 +1 @@ + \ No newline at end of file
  48. Download patch src/main/org/codehaus/groovy/ant/Groovyc.java

    --- 2.0.0~beta2-1/src/main/org/codehaus/groovy/ant/Groovyc.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/org/codehaus/groovy/ant/Groovyc.java 2012-02-09 20:55:10.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2010 the original author or authors. + * Copyright 2003-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,11 +36,11 @@ import org.apache.tools.ant.util.SourceF import org.codehaus.groovy.control.CompilationUnit; import org.codehaus.groovy.control.CompilerConfiguration; import org.codehaus.groovy.control.SourceExtensionHandler; +import org.codehaus.groovy.runtime.DefaultGroovyMethods; import org.codehaus.groovy.tools.ErrorReporter; import org.codehaus.groovy.tools.FileSystemCompiler; import org.codehaus.groovy.tools.RootLoader; import org.codehaus.groovy.tools.javac.JavaAwareCompilationUnit; -import org.codehaus.groovy.runtime.DefaultGroovyMethods; import java.io.File; import java.io.FileWriter; @@ -51,6 +51,7 @@ import java.net.MalformedURLException; import java.net.URL; import java.nio.charset.Charset; import java.util.ArrayList; +import java.util.Arrays; import java.util.Enumeration; import java.util.Iterator; import java.util.LinkedHashSet; @@ -750,7 +751,7 @@ public class Groovyc extends MatchingTas String optionStr = st.nextToken(); String replaced = optionStr.replace("-X", "-FX"); if(optionStr == replaced) { - replaced = optionStr.replace("-W", "-FW"); // GROOVY-5063 + replaced = optionStr.replace("-W", "-FW"); // GROOVY-5063 } jointOptions.add(replaced); } @@ -862,6 +863,7 @@ public class Groovyc extends MatchingTas final Execute executor = new Execute(); // new LogStreamHandler ( attributes , Project.MSG_INFO , Project.MSG_WARN ) ) ; executor.setAntRun(getProject()); executor.setWorkingDirectory(getProject().getBaseDir()); + executor.setEnvironment(addClasspathToEnvironment(executor.getEnvironment(), classpath.toString())); executor.setCommandline(commandLine); try { executor.execute(); @@ -937,6 +939,12 @@ public class Groovyc extends MatchingTas } } + private String[] addClasspathToEnvironment(String[] oldEnvironment, String classpath) { + List<String> newEnvironmentList = (oldEnvironment == null) ? new ArrayList<String>() : Arrays.asList(oldEnvironment); + newEnvironmentList.add("classpath=" + classpath); + return newEnvironmentList.toArray(new String[newEnvironmentList.size()]); + } + protected CompilationUnit makeCompileUnit() { Map<String, Object> options = configuration.getJointCompilationOptions(); if (options != null) {
  49. Download patch src/main/groovy/transform/Canonical.java

    --- 2.0.0~beta2-1/src/main/groovy/transform/Canonical.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/transform/Canonical.java 2012-02-09 20:55:10.000000000 +0000 @@ -77,6 +77,9 @@ import java.lang.annotation.Target; * If an "underscore" version of the respective method already exists, then no default implementation is provided. * </ul> * <p/> + * If you want similar functionality to what this annotation provides but also require immutability, see the + * {@code @Immutable} annotation. + * <p/> * Limitations: * <ul> * <li> @@ -88,6 +91,7 @@ import java.lang.annotation.Target; * @see groovy.transform.EqualsAndHashCode * @see groovy.transform.ToString * @see groovy.transform.TupleConstructor + * @see groovy.transform.Immutable * @since 1.8.0 */ @java.lang.annotation.Documented
  50. Download patch src/main/groovy/swing/impl/ComponentFacade.java

    --- 2.0.0~beta2-1/src/main/groovy/swing/impl/ComponentFacade.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/impl/ComponentFacade.java 2012-02-09 20:55:10.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright 2003-2007 the original author or authors. + * + * 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 under the License. + */ +package groovy.swing.impl; + +import java.awt.Component; + +/** + * A facade to an object which contains a component. + * + * @author <a href="mailto:james@coredevelopers.net">James Strachan</a> + * @version $Revision$ + * @deprecated This interface is no longer used internally and there + * exists no equivalent functionality + * Superceded by FactoryBuilderSupport handling. + */ +public interface ComponentFacade { + Component getComponent(); +}
  51. Download patch .classpath

    --- 2.0.0~beta2-1/.classpath 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.classpath 2012-02-09 20:55:10.000000000 +0000 @@ -1,13 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src/main"/> - <classpathentry excluding="groovy/bugs/Groovy1759_Bug.groovy|groovy/MultiCatchTest.groovy|org/codehaus/groovy/benchmarks/alioth/|groovy/PropertyTest.groovy|groovy/annotations/package-info.groovy" kind="src" output="bin" path="src/test"/> - <classpathentry kind="src" path="subprojects/groovy-bsf/src/main/java"/> - <classpathentry kind="src" output="bin" path="subprojects/groovy-bsf/src/test/java"/> - <classpathentry kind="src" path="subprojects/groovy-jmx/src/main/groovy"/> - <classpathentry kind="src" path="subprojects/groovy-jmx/src/main/java"/> - <classpathentry kind="src" output="bin" path="subprojects/groovy-jmx/src/test/groovy"/> - <classpathentry kind="src" output="bin" path="subprojects/groovy-jmx/src/test/java"/> + <classpathentry kind="src" output="target/test-classes" path="src/test"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.4"/> <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.8.1/ant-1.8.1.jar"/> <classpathentry kind="var" path="M2_REPO/javax/servlet/jsp-api/2.0/jsp-api-2.0.jar"/> @@ -16,7 +10,7 @@ <classpathentry kind="var" path="M2_REPO/bsf/bsf/2.4.0/bsf-2.4.0.jar"/> <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/> <classpathentry kind="var" path="M2_REPO/jmock/jmock-cglib/1.2.0/jmock-cglib-1.2.0.jar"/> - <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.8.2/ant-junit-1.8.2.jar"/> + <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.8.1/ant-junit-1.8.1.jar"/> <classpathentry kind="var" path="M2_REPO/commons-cli/commons-cli/1.0/commons-cli-1.0.jar"/> <classpathentry kind="var" path="M2_REPO/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar"/> <classpathentry kind="var" path="M2_REPO/com/thoughtworks/xstream/xstream/1.3.1/xstream-1.3.1.jar"/> @@ -28,20 +22,12 @@ <classpathentry kind="var" path="M2_REPO/asm/asm-util/3.2/asm-util-3.2.jar"/> <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.8.1/ant-launcher-1.8.1.jar"/> <classpathentry kind="lib" path="security/GroovyJarTest.jar"/> + <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.9/log4j-1.2.9.jar"/> <classpathentry kind="var" path="M2_REPO/jline/jline/0.9.94/jline-0.9.94.jar"/> + <classpathentry kind="var" path="M2_REPO"/> <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-testutil/1.8.2/ant-testutil-1.8.2.jar"/> <classpathentry kind="var" path="M2_REPO/junit/junit/4.8.2/junit-4.8.2.jar"/> <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar"/> <classpathentry kind="var" path="M2_REPO/xmlunit/xmlunit/1.3/xmlunit-1.3.jar"/> - <classpathentry kind="var" path="M2_REPO/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar"/> - <classpathentry kind="var" path="M2_REPO/org/fusesource/jansi/jansi/1.2.1/jansi-1.2.1.jar"/> - <classpathentry kind="var" path="M2_REPO/ch/qos/logback/logback-classic/0.9.21/logback-classic-0.9.21.jar"/> - <classpathentry kind="var" path="M2_REPO/org/objectweb/asm/com.springsource.org.objectweb.asm.commons/2.2.3/com.springsource.org.objectweb.asm.commons-2.2.3.jar"/> - <classpathentry kind="var" path="M2_REPO/com/thoughtworks/qdox/qdox/1.8/qdox-1.8.jar"/> - <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar"/> - <classpathentry kind="var" path="M2_REPO/ch/qos/logback/logback-core/0.9.21/logback-core-0.9.21.jar"/> - <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.16/log4j-1.2.16.jar"/> - <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar"/> - <classpathentry kind="lib" path="target/classes"/> - <classpathentry kind="output" path="bin"/> + <classpathentry kind="output" path="target/classes"/> </classpath>
  52. Download patch src/main/groovy/inspect/TextNode.groovy

    --- 2.0.0~beta2-1/src/main/groovy/inspect/TextNode.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/inspect/TextNode.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -21,6 +21,8 @@ */ package groovy.inspect +import groovy.inspect.swingui.AstBrowserNodeMaker + class TextNode { Object userObject List<List<String>> properties
  53. Download patch src/main/groovy/inspect/swingui/AstBrowser.groovy

    --- 2.0.0~beta2-1/src/main/groovy/inspect/swingui/AstBrowser.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/inspect/swingui/AstBrowser.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -33,12 +33,7 @@ import javax.swing.tree.TreeNode import javax.swing.tree.TreeSelectionModel import org.codehaus.groovy.control.Phases import static java.awt.GridBagConstraints.* -import org.codehaus.groovy.ast.ClassNode -import groovy.lang.GroovyClassLoader.ClassCollector -import org.codehaus.groovy.control.CompilationUnit -import org.codehaus.groovy.control.SourceUnit -import org.objectweb.asm.ClassReader -import org.objectweb.asm.util.TraceClassVisitor +import java.awt.Component /** * This object is a GUI for looking at the AST that Groovy generates. @@ -53,15 +48,15 @@ import org.objectweb.asm.util.TraceClass public class AstBrowser { - private inputArea, rootElement, decompiledSource, jTree, propertyTable, splitterPane, mainSplitter, bytecodeView + private inputArea, rootElement, decompiledSource, jTree, propertyTable, splitterPane, mainSplitter boolean showScriptFreeForm, showScriptClass, showTreeView - GeneratedBytecodeAwareGroovyClassLoader classLoader + GroovyClassLoader classLoader def prefs = new AstBrowserUiPreferences() AstBrowser(inputArea, rootElement, classLoader) { this.inputArea = inputArea this.rootElement = rootElement - this.classLoader = new GeneratedBytecodeAwareGroovyClassLoader(classLoader) + this.classLoader = classLoader } def swing, frame @@ -167,10 +162,7 @@ public class AstBrowser { mainSplitter = splitPane( orientation: JSplitPane.VERTICAL_SPLIT, topComponent: splitterPane, - bottomComponent: tabbedPane { - widget(decompiledSource = new groovy.ui.ConsoleTextEditor(editable: false, showLineNumbers: false), title:'Source') - widget(bytecodeView = new groovy.ui.ConsoleTextEditor(editable: false, showLineNumbers: false), title:'Bytecode') - }, + bottomComponent: decompiledSource = new groovy.ui.ConsoleTextEditor(editable: false, showLineNumbers: false), constraints: gbc(gridx: 0, gridy: 2, gridwidth: 3, gridheight: 1, weightx: 1.0, weighty: 1.0, anchor: NORTHWEST, fill: BOTH, insets: [2, 2, 2, 2])) { } } @@ -208,23 +200,6 @@ public class AstBrowser { inputArea.moveCaretPosition(inputArea.getCaretPosition()) } } - - boolean classNode = node.properties.any { it[0]=='class' && it[1] in['class org.codehaus.groovy.ast.ClassNode', 'class org.codehaus.groovy.ast.InnerClassNode'] } - if (classNode) { - def className = node.properties.find { it[0]=='name' }[1] - def bytecode = classLoader.getBytecode(className) - if (bytecode) { - def writer = new StringWriter() - def visitor = new TraceClassVisitor(new PrintWriter(writer)); - def reader = new ClassReader(bytecode) - reader.accept(visitor, 0) - bytecodeView.textEditor.text = writer.toString() - } else { - bytecodeView.textEditor.text = '// No bytecode available at this phase' - } - } else { - bytecodeView.textEditor.text = '' - } } propertyTable.model.fireTableDataChanged() } as TreeSelectionListener) @@ -337,7 +312,6 @@ public class AstBrowser { try { def nodeMaker = new SwingTreeNodeMaker() def adapter = new ScriptToTreeNodeAdapter(classLoader, showScriptFreeForm, showScriptClass, nodeMaker) - classLoader.clearBytecodeTable() def result = adapter.compile(script, compilePhase) swing.doLater { model.setRoot(result) @@ -482,43 +456,3 @@ class SwingTreeNodeMaker implements AstB new TreeNodeWithProperties(userObject, properties) } } - -class BytecodeCollector extends ClassCollector { - - Map<String, byte[]> bytecode - - BytecodeCollector(ClassCollector delegate, Map<String,byte[]> bytecode) { - super(delegate.cl, delegate.unit, delegate.su) - this.bytecode = bytecode - } - - @Override - protected Class createClass(byte[] code, ClassNode classNode) { - bytecode[classNode.name] = code - return super.createClass(code, classNode) - } - -} - -class GeneratedBytecodeAwareGroovyClassLoader extends GroovyClassLoader { - - private final Map<String, byte[]> bytecode = new HashMap<String, byte[]>(); - - GeneratedBytecodeAwareGroovyClassLoader(final GroovyClassLoader parent) { - super(parent) - } - - @Override - protected ClassCollector createCollector(CompilationUnit unit, SourceUnit su) { - def collector = super.createCollector(unit, su) - new BytecodeCollector(collector, bytecode) - } - - public void clearBytecodeTable() { - bytecode.clear() - } - - public byte[] getBytecode(final String className) { - bytecode[className] - } -} \ No newline at end of file
  54. Download patch benchmark/bench.groovy

    --- 2.0.0~beta2-1/benchmark/bench.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/benchmark/bench.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -4,8 +4,8 @@ import org.codehaus.groovy.tools.FileSys def benchData = [ hello : [1], ackermann : [5, 6, 7, 8], - ary : [10,100,1000,1000000], -/* binarytrees : [1], +/* ary : [1], + binarytrees : [1], chameneos : [1], echo : [1], except : [1], @@ -58,7 +58,7 @@ println "Groovy benchmarking test" showJavaVersion() println "Groovy lib: $GROOVY_LIB" horizontalBreak() -def executeBench= { bench, input -> +benchData.each { bench, input -> println "Benchmark $bench" [".java", ".groovy"].each { ending -> println("\t$bench$ending :") @@ -73,12 +73,6 @@ def executeBench= { bench, input -> } horizontalBreak() } -if (args.length==0) { - benchData.each(executeBench) -} else { - executeBench(args[0],benchData[args[0]]) -} - void horizontalBreak() { println "-" * 80
  55. Download patch src/main/groovy/swing/impl/ContainerFacade.java

    --- 2.0.0~beta2-1/src/main/groovy/swing/impl/ContainerFacade.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/impl/ContainerFacade.java 2012-02-09 20:55:10.000000000 +0000 @@ -0,0 +1,31 @@ +/* + * Copyright 2003-2007 the original author or authors. + * + * 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 under the License. + */ +package groovy.swing.impl; + +import java.awt.Component; + +/** + * A facade to an object to which components can be added. + * + * @author <a href="mailto:james@coredevelopers.net">James Strachan</a> + * @version $Revision$ + * @deprecated This interface is no longer used internally and there + * exists no equivalent functionality + * Superceded by FactoryBuilderSupport handling. + */ +public interface ContainerFacade { + void addComponent(Component component); +}
  56. Download patch src/main/groovy/inspect/swingui/ScriptToTreeNodeAdapter.groovy

    --- 2.0.0~beta2-1/src/main/groovy/inspect/swingui/ScriptToTreeNodeAdapter.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/inspect/swingui/ScriptToTreeNodeAdapter.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -94,7 +94,6 @@ class ScriptToTreeNodeAdapter { def scriptName = "script" + System.currentTimeMillis() + ".groovy" GroovyCodeSource codeSource = new GroovyCodeSource(script, scriptName, "/groovy/script") CompilationUnit cu = new CompilationUnit(CompilerConfiguration.DEFAULT, codeSource.codeSource, classLoader) - cu.setClassgenCallback(classLoader.createCollector(cu, null)) TreeNodeBuildingNodeOperation operation = new TreeNodeBuildingNodeOperation(this, showScriptFreeForm, showScriptClass) cu.addPhaseOperation(operation, compilePhase) cu.addSource(codeSource.getName(), script);
  57. Download patch gradle/wrapper/gradle-wrapper.properties

    --- 2.0.0~beta2-1/gradle/wrapper/gradle-wrapper.properties 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradle/wrapper/gradle-wrapper.properties 2012-02-09 20:55:10.000000000 +0000 @@ -1,4 +1,4 @@ -#Mon May 02 20:57:32 EST 2011 +#Tue Jan 04 21:15:37 EST 2011 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME Binary files 2.0.0~beta2-1/.gradle/1.0-milestone-6/fileHashes/cache.bin and 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/fileHashes/cache.bin differ
  58. Download patch gradle/docs.gradle

    --- 2.0.0~beta2-1/gradle/docs.gradle 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradle/docs.gradle 2012-02-09 20:55:10.000000000 +0000 @@ -1,72 +1,71 @@ -task doc(dependsOn: [javadoc, groovydoc, 'docGDK']) { - footer = "Copyright &amp;copy; 2003-2011 The Codehaus. All rights reserved." - title = "Groovy ${groovyVersion}" -} - -javadoc { - maxMemory = javaDoc_mx - project.configure(options) { - windowTitle = doc.title - docTitle = doc.title - encoding = "ISO-8859-1" - author = true - version = true - overview = "src/main/overview.html" - footer = doc.footer - source = "1.5" - links("http://java.sun.com/javase/6/docs/api", "http://www.dpml.net/api/ant/1.7.0", - "http://commons.apache.org/cli/api-release", "http://junit.sourceforge.net/junit3.8.1/javadoc", - "http://java.sun.com/j2ee/1.4/docs/api", "http://www.antlr2.org/javadoc") - } -} - -groovydoc { - dependsOn classes - groovyClasspath = configurations.compile - use = true - windowtitle = doc.title - doctitle = doc.title - header = doc.title - footer = doc.footer - overview = file("src/main/overview.html") - includePrivate = false - link "http://java.sun.com/j2ee/1.4/docs/api", "javax.servlet.", "javax.management." - link "http://java.sun.com/javase/6/docs/api", "java.", "org.xml.", "javax.", "org.xml." - link "http://www.dpml.net/api/ant/1.7.0", "org.apache.ant.", "org.apache.tools.ant." - link "http://junit.sourceforge.net/junit3.8.1/javadoc", "org.junit.", "junit." - link "http://www.antlr2.org/javadoc", "antlr." - link "http://commons.apache.org/cli/api-release", "org.apache.commons.cli." -} - -task docGDK { - destinationDir = "$buildDir/html/groovy-jdk" - inputs.files sourceSets.tools.runtimeClasspath - outputs.dir destinationDir - doFirst {task -> - ant { - java(classname: "org.codehaus.groovy.tools.DocGenerator", fork: "yes", failonerror: "true", - classpath: sourceSets.tools.runtimeClasspath.asPath, - errorproperty: 'edr', - outputproperty: 'odr') { - arg(value: "org.codehaus.groovy.runtime.DefaultGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.SqlGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.SwingGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.XmlGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.EncodingGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.DateGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.ProcessGroovyMethods") - arg(value: "org.codehaus.groovy.runtime.DefaultGroovyStaticMethods") - arg(value: "org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods") - arg(value: "org.codehaus.groovy.vmplugin.v6.PluginDefaultGroovyMethods") - arg(value: "org.codehaus.groovy.vmplugin.v6.PluginStaticGroovyMethods") - } -// println "Out: " + ant.properties.edr -// println "Err: " + ant.properties.odr - } - copy { - into task.destinationDir - from "src/tools/org/codehaus/groovy/tools/groovy.ico", "src/tools/org/codehaus/groovy/tools/stylesheet.css" - } - } -} - +task doc(dependsOn: [javadoc, groovydoc, 'docGDK']) { + footer = "Copyright &amp;copy; 2003-2012 The Codehaus. All rights reserved." + title = "Groovy ${groovyVersion}" +} + +javadoc { + maxMemory = javaDoc_mx + project.configure(options) { + windowTitle = doc.title + docTitle = doc.title + encoding = "ISO-8859-1" + author = true + version = true + overview = "src/main/overview.html" + footer = doc.footer + source = "1.5" + links("http://docs.oracle.com/javase/6/docs/api/", "http://evgeny-goldin.org/javadoc/ant/api/", + "http://commons.apache.org/cli/api-release", "http://kentbeck.github.com/junit/javadoc/latest/", + "http://docs.oracle.com/javaee/6/api/", "http://www.antlr2.org/javadoc") + } +} + +groovydoc { + dependsOn classes + groovyClasspath = configurations.compile + use = true + windowtitle = doc.title + doctitle = doc.title + header = doc.title + footer = doc.footer + overview = file("src/main/overview.html") + includePrivate = false + link "http://docs.oracle.com/javaee/6/api/", "javax.servlet.", "javax.management." + link "http://docs.oracle.com/javase/6/docs/api/", "java.", "org.xml.", "javax.", "org.w3c." + link "http://evgeny-goldin.org/javadoc/ant/api/", "org.apache.ant.", "org.apache.tools.ant." + link "http://kentbeck.github.com/junit/javadoc/latest/", "org.junit.", "junit." + link "http://www.antlr2.org/javadoc", "antlr." + link "http://commons.apache.org/cli/api-release", "org.apache.commons.cli." +} + +task docGDK { + destinationDir = "$buildDir/html/groovy-jdk" + inputs.files sourceSets.tools.runtimeClasspath + outputs.dir destinationDir + doFirst {task -> + ant { + java(classname: "org.codehaus.groovy.tools.DocGenerator", fork: "yes", failonerror: "true", + classpath: sourceSets.tools.runtimeClasspath.asPath, + errorproperty: 'edr', + outputproperty: 'odr') { + arg(value: "org.codehaus.groovy.runtime.DefaultGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.SqlGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.SwingGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.XmlGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.EncodingGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.DateGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.ProcessGroovyMethods") + arg(value: "org.codehaus.groovy.runtime.DefaultGroovyStaticMethods") + arg(value: "org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods") + arg(value: "org.codehaus.groovy.vmplugin.v6.PluginDefaultGroovyMethods") + arg(value: "org.codehaus.groovy.vmplugin.v6.PluginStaticGroovyMethods") + } +// println "Out: " + ant.properties.edr +// println "Err: " + ant.properties.odr + } + copy { + into task.destinationDir + from "src/tools/org/codehaus/groovy/tools/groovy.ico", "src/tools/org/codehaus/groovy/tools/stylesheet.css" + } + } +}
  59. Download patch debian/watch

    --- 2.0.0~beta2-1/debian/watch 2011-10-15 02:55:46.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/debian/watch 2012-03-15 13:06:56.000000000 +0000 @@ -1,3 +1,2 @@ version=3 -opts="uversionmangle=s/-beta-/~beta/" \ -http://dist.groovy.codehaus.org/distributions/ groovy-src-(.*).zip debian debian/orig-tar.sh +http://dist.groovy.codehaus.org/distributions/ groovy-src-(.*1\.8.*).zip debian debian/orig-tar.sh
  60. Download patch src/main/groovy/xml/streamingmarkupsupport/StreamingMarkupWriter.java

    --- 2.0.0~beta2-1/src/main/groovy/xml/streamingmarkupsupport/StreamingMarkupWriter.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/xml/streamingmarkupsupport/StreamingMarkupWriter.java 2012-02-09 20:55:10.000000000 +0000 @@ -76,7 +76,7 @@ public class StreamingMarkupWriter exten StreamingMarkupWriter.this.writingAttribute = writingAttribute; } - public Writer escaped() { + public Writer excaped() { return escapedWriter; }
  61. Download patch src/main/groovy/servlet/TemplateServlet.java
  62. Download patch .gradle/1.0-milestone-6/fileHashes/cache.properties

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/fileHashes/cache.properties 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/fileHashes/cache.properties 2012-01-27 14:22:02.000000000 +0000 @@ -0,0 +1 @@ +#Fri Jan 27 09:52:02 CET 2012
  63. Download patch src/main/groovy/xml/dom/DOMCategory.java
  64. Download patch src/main/groovy/grape/GrapeIvy.groovy

    --- 2.0.0~beta2-1/src/main/groovy/grape/GrapeIvy.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/grape/GrapeIvy.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -194,7 +194,7 @@ class GrapeIvy implements GrapeEngine { public IvyGrabRecord createGrabRecord(Map deps) { // parse the actual dependency arguments String module = deps.module ?: deps.artifactId ?: deps.artifact - if (!module) { + if (!module) { throw new RuntimeException('grab requires at least a module: or artifactId: or artifact: argument') }
  65. Download patch pom.xml

    --- 2.0.0~beta2-1/pom.xml 2011-12-23 19:01:28.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/pom.xml 2012-02-09 22:26:50.000000000 +0000 @@ -8,7 +8,7 @@ <name>Groovy</name> <packaging>jar</packaging> - <version>2.0.0-beta-2</version> + <version>1.8.6</version> <description> Groovy: A powerful, dynamic language for the JVM @@ -44,6 +44,14 @@ </mailingList> </mailingLists> + <licenses> + <license> + <name>The Apache Software License, Version 2.0</name> + <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url> + <distribution>repo</distribution> + </license> + </licenses> + <distributionManagement> <repository> <id>codehaus.org</id> @@ -377,6 +385,15 @@ <role>Developer</role> </roles> </developer> + <developer> + <name>Cédric Champeau</name> + <id>melix</id> + <email>cedric.champeau@gmail.com</email> + <organization></organization> + <roles> + <role>Developer</role> + </roles> + </developer> </developers> <contributors> @@ -557,15 +574,23 @@ <email></email> </contributor> <contributor> - <name>Cédric Champeau</name> + <name>David Durham</name> <email></email> </contributor> <contributor> - <name>David Durham</name> + <name>Daniel Henrique Alves Lima</name> <email></email> </contributor> <contributor> - <name>Daniel Henrique Alves Lima</name> + <name>John Wagenleitner</name> + <email></email> + </contributor> + <contributor> + <name>Colin Harrington</name> + <email></email> + </contributor> + <contributor> + <name>Brian Alexander</name> <email></email> </contributor> </contributors> @@ -582,7 +607,7 @@ <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> - <version>3.3.1</version> + <version>3.2</version> <scope>compile</scope> </dependency> <dependency> @@ -659,25 +684,25 @@ <dependency> <groupId>asm</groupId> <artifactId>asm-commons</artifactId> - <version>3.3.1</version> + <version>3.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm-util</artifactId> - <version>3.3.1</version> + <version>3.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm-analysis</artifactId> - <version>3.3.1</version> + <version>3.2</version> <scope>compile</scope> </dependency> <dependency> <groupId>asm</groupId> <artifactId>asm-tree</artifactId> - <version>3.3.1</version> + <version>3.2</version> <scope>compile</scope> </dependency> @@ -856,6 +881,14 @@ <version>1.8.2</version> <scope>test</scope> </dependency> +<!-- + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.1.1</version> + <scope>test</scope> + </dependency> +--> </dependencies> <!--
  66. Download patch NOTICE.txt

    --- 2.0.0~beta2-1/NOTICE.txt 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/NOTICE.txt 2012-02-09 20:55:10.000000000 +0000 @@ -11,4 +11,3 @@ This product includes software developed by The Groovy community (http://groovy.codehaus.org/). -
  67. Download patch src/main/groovy/swing/impl/TableLayout.java

    --- 2.0.0~beta2-1/src/main/groovy/swing/impl/TableLayout.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/impl/TableLayout.java 2012-02-09 20:55:10.000000000 +0000 @@ -15,6 +15,7 @@ */ package groovy.swing.impl; +import java.awt.Component; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; @@ -35,6 +36,14 @@ public class TableLayout extends JPanel public TableLayout() { setLayout(new GridBagLayout()); } + + /** + * @deprecated Simply returns this + * @return this + */ + public Component getComponent() { + return this; + } public int getCellpadding() { return cellpadding;
  68. Download patch src/main/groovy/lang/GroovyCodeSource.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/GroovyCodeSource.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/GroovyCodeSource.java 2012-02-09 20:55:10.000000000 +0000 @@ -95,6 +95,31 @@ public class GroovyCodeSource { } } + /** + * Construct a GroovyCodeSource for an inputStream of groovyCode that has an + * unknown provenance -- meaning it didn't come from a File or a URL (e.g.&nbsp;a String). + * The supplied codeBase will be used to construct a File URL that should match up + * with a java Policy entry that determines the grants to be associated with the + * class that will be built from the InputStream. + * <p/> + * The permission groovy.security.GroovyCodeSourcePermission will be used to determine if the given codeBase + * may be specified. That is, the current Policy set must have a GroovyCodeSourcePermission that implies + * the codeBase, or an exception will be thrown. This is to prevent callers from hijacking + * existing codeBase policy entries unless explicitly authorized by the user. + * + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + @Deprecated + public GroovyCodeSource(InputStream inputStream, String name, String codeBase) { + this.name = name; + this.codeSource = createCodeSource(codeBase); + try { + this.scriptText = DefaultGroovyMethods.getText(inputStream); + } catch (IOException e) { + throw new RuntimeException("Impossible to read the text content from that input stream, for script: " + name + " with codeBase: " + codeBase, e); + } + } + public GroovyCodeSource(final File infile, final String encoding) throws IOException { // avoid files which confuse us like ones with .. in path final File file = new File(infile.getCanonicalPath()); @@ -176,6 +201,34 @@ public class GroovyCodeSource { return codeSource; } + /** + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + @Deprecated + public InputStream getInputStream() { + IOException ioe; + if (file == null) { + try { + return new ByteArrayInputStream(scriptText.getBytes("UTF-8")); + } catch (UnsupportedEncodingException e) { + ioe = e; + } + } else { + try { + return new FileInputStream(file); + } catch (FileNotFoundException e) { + ioe = e; + } + } + + String errorMsg = "Impossible to read the bytes from the associated script: " + scriptText + " with name: " + name; + if (ioe != null) { + throw new RuntimeException(errorMsg, ioe); + } else { + throw new RuntimeException(errorMsg); + } + } + public String getScriptText() { return scriptText; }
  69. Download patch src/main/groovy/util/GroovyScriptEngine.java

    --- 2.0.0~beta2-1/src/main/groovy/util/GroovyScriptEngine.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/GroovyScriptEngine.java 2012-02-09 20:55:10.000000000 +0000 @@ -16,6 +16,7 @@ package groovy.util; import groovy.lang.Binding; +import groovy.lang.DeprecationException; import groovy.lang.GroovyClassLoader; import groovy.lang.GroovyCodeSource; import groovy.lang.GroovyResourceLoader; @@ -436,6 +437,18 @@ public class GroovyScriptEngine implemen } /** + * @param parentClassLoader ClassLoader to be used as the parent ClassLoader + * for scripts executed by the engine + * @deprecated + */ + public void setParentClassLoader(ClassLoader parentClassLoader) { + throw new DeprecationException( + "The method GroovyScriptEngine#setParentClassLoader(ClassLoader) " + + "is no longer supported. Specify a parentLoader in the constructor instead." + ); + } + + /** * Get the class of the scriptName in question, so that you can instantiate * Groovy objects with caching and reloading. * @@ -466,6 +479,25 @@ public class GroovyScriptEngine implemen } /** + * Get the class of the scriptName in question, so that you can instantiate + * Groovy objects with caching and reloading. + * + * @param scriptName resource name pointing to the script + * @param parentClassLoader the class loader to use when loading the script + * @return the loaded scriptName as a compiled class + * @throws ResourceException if there is a problem accessing the script + * @throws ScriptException if there is a problem parsing the script + * @deprecated + */ + public Class loadScriptByName(String scriptName, ClassLoader parentClassLoader) + throws ResourceException, ScriptException { + throw new DeprecationException( + "The method GroovyScriptEngine#loadScriptByName(String,ClassLoader) " + + "is no longer supported. Use GroovyScriptEngine#loadScriptByName(String) instead." + ); + } + + /** * Run a script identified by name with a single argument. * * @param scriptName name of the script to run
  70. Download patch src/main/groovy/transform/CompilationUnitAware.java

    --- 2.0.0~beta2-1/src/main/groovy/transform/CompilationUnitAware.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/transform/CompilationUnitAware.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,18 +0,0 @@ -package groovy.transform; -/** - * Created by IntelliJ IDEA. - * User: cedric - * Date: 06/10/11 - * Time: 15:02 - */ - -import org.codehaus.groovy.control.CompilationUnit; - -/** - * This interface is for AST transformations which must be aware of the compilation unit where they are applied. - * - * @author Cedric Champeau - */ -public interface CompilationUnitAware { - void setCompilationUnit(CompilationUnit unit); -}
  71. Download patch src/main/groovy/lang/Immutable.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/Immutable.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/Immutable.java 2012-02-09 20:55:10.000000000 +0000 @@ -0,0 +1,126 @@ +/* + * Copyright 2008 the original author or authors. + * + * 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 under the License. + */ + +package groovy.lang; + +import org.codehaus.groovy.transform.GroovyASTTransformationClass; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Note: This class is Deprecated, please use groovy.transform.Immutable. + * <p/> + * Class annotation used to assist in the creation of immutable classes. + * <p/> + * It allows you to write classes in this shortened form: + * <pre> + * {@code @Immutable} class Customer { + * String first, last + * int age + * Date since + * Collection favItems + * } + * def d = new Date() + * def c1 = new Customer(first:'Tom', last:'Jones', age:21, since:d, favItems:['Books', 'Games']) + * def c2 = new Customer('Tom', 'Jones', 21, d, ['Books', 'Games']) + * assert c1 == c2 + * </pre> + * The {@code @Immutable} annotation instructs the compiler to execute an + * AST transformation which adds the necessary getters, constructors, + * equals, hashCode and other helper methods that are typically written + * when creating immutable classes with the defined properties. + * <p/> + * A class created in this way has the following characteristics: + * <ul> + * <li>The class is automatically made final. + * <li>Properties must be of an immutable type or a type with a strategy for handling non-immutable + * characteristics. Specifically, the type must be one of the primitive or wrapper types, Strings, enums, + * other {@code @Immutable} classes or known immutables (e.g. java.awt.Color, java.net.URI). Also handled are + * Cloneable classes, collections, maps and arrays, and other "effectively immutable" classes with + * special handling (e.g. java.util.Date). + * <li>Properties automatically have private, final backing fields with getters. + * Attempts to update the property will result in a {@code ReadOnlyPropertyException}. + * <li>A map-based constructor is provided which allows you to set properties by name. + * <li>A tuple-style constructor is provided which allows you to set properties in the same order as they are defined. + * <li>Default {@code equals}, {@code hashCode} and {@code toString} methods are provided based on the property values. + * Though not normally required, you may write your own implementations of these methods. For {@code equals} and {@code hashCode}, + * if you do write your own method, it is up to you to obey the general contract for {@code equals} methods and supply + * a corresponding matching {@code hashCode} method. + * If you do provide one of these methods explicitly, the default implementation will be made available in a private + * "underscore" variant which you can call. E.g., you could provide a (not very elegant) multi-line formatted + * {@code toString} method for {@code Customer} above as follows: + * <pre> + * String toString() { + * _toString().replaceAll(/\(/, '(\n\t').replaceAll(/\)/, '\n)').replaceAll(/, /, '\n\t') + * } + * </pre> + * If an "underscore" version of the respective method already exists, then no default implementation is provided. + * <li>{@code Date}s, {@code Cloneable}s and arrays are defensively copied on the way in (constructor) and out (getters). + * Arrays and {@code Cloneable} objects use the {@code clone} method. For your own classes, + * it is up to you to define this method and use deep cloning if appropriate. + * <li>{@code Collection}s and {@code Map}s are wrapped by immutable wrapper classes (but not deeply cloned!). + * Attempts to update them will result in an {@code UnsupportedOperationException}. + * <li>Fields that are enums or other {@code @Immutable} classes are allowed but for an + * otherwise possible mutable property type, an error is thrown. + * <li>You don't have to follow Groovy's normal property conventions, e.g. you can create an explicit private field and + * then you can write explicit get and set methods. Such an approach, isn't currently prohibited (to give you some + * wiggle room to get around these conventions) but any fields created in this way are deemed not to be part of the + * significant state of the object and aren't factored into the {@code equals} or {@code hashCode} methods. + * Similarly, you may use static properties (though usually this is discouraged) and these too will be ignored + * as far as significant state is concerned. If you do break standard conventions, you do so at your own risk and + * your objects may no longer be immutable. It is up to you to ensure that your objects remain immutable at least + * to the extent expected in other parts of your program! + * </ul> + * <p/> + * Immutable classes are particularly useful for functional and concurrent styles of programming + * and for use as key values within maps. + * <p/> + * Limitations: + * <ul> + * <li> + * As outlined above, Arrays and {@code Cloneable} objects use the {@code clone} method. For your own classes, + * it is up to you to define this method and use deep cloning if appropriate. + * </li> + * <li> + * As outlined above, {@code Collection}s and {@code Map}s are wrapped by immutable wrapper classes (but not deeply cloned!). + * </li> + * <li> + * Currently {@code BigInteger} and {@code BigDecimal} are deemed immutable but see: + * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6348370 + * </li> + * <li> + * {@code java.awt.Color} is treated as "effectively immutable" but is not final so while not normally used with child + * classes, it isn't strictly immutable. Use at your own risk. + * </li> + * <li> + * {@code java.util.Date} is treated as "effectively immutable" but is not final so it isn't strictly immutable. + * Use at your own risk. + * </li> + * </ul> + * + * @author Paul King + * @deprecated use groovy.transform.Immutable + */ +@java.lang.annotation.Documented +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE}) +@GroovyASTTransformationClass("org.codehaus.groovy.transform.ImmutableASTTransformation") +@Deprecated +public @interface Immutable { +}
  72. Download patch src/main/groovy/swing/factory/CellEditorFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/CellEditorFactory.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/CellEditorFactory.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -18,6 +18,7 @@ package groovy.swing.factory import groovy.swing.impl.ClosureCellEditor import java.awt.Component +import javax.swing.JTree /** * @author Alexander Klein
  73. Download patch src/main/groovy/ui/InteractiveShell.java
  74. Download patch src/main/groovy/lang/GroovyShell.java

    --- 2.0.0~beta2-1/src/main/groovy/lang/GroovyShell.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/lang/GroovyShell.java 2012-02-09 20:55:10.000000000 +0000 @@ -21,6 +21,7 @@ import groovy.security.GroovyCodeSourceP import org.codehaus.groovy.control.CompilationFailedException; import org.codehaus.groovy.control.CompilerConfiguration; import org.codehaus.groovy.runtime.InvokerHelper; +import org.codehaus.groovy.runtime.DefaultGroovyMethods; import org.codehaus.groovy.runtime.InvokerInvocationException; import java.io.*; @@ -31,6 +32,7 @@ import java.security.PrivilegedAction; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.List; +import java.util.Map; /** * Represents a groovy shell capable of running arbitrary groovy scripts @@ -44,6 +46,9 @@ public class GroovyShell extends GroovyO public static final String DEFAULT_CODE_BASE = "/groovy/shell"; + @Deprecated + public static final String[] EMPTY_ARGS = {}; + private Binding context; private int counter; private CompilerConfiguration config; @@ -93,6 +98,12 @@ public class GroovyShell extends GroovyO this.context = binding; this.config = config; } + + @Deprecated + public void initializeBinding() { + Map map = context.getVariables(); + if (map.get("shell")==null) map.put("shell",this); + } public void resetLoadedClasses() { loader.clearCache(); @@ -523,6 +534,32 @@ public class GroovyShell extends GroovyO return runScriptOrMainOrTestOrRunnable(scriptClass, args); } + /** + * Runs the given script with command line arguments + * + * @param in the stream reading the script + * @param fileName is the logical file name of the script (which is used to create the class name of the script) + * @param args the command line arguments to pass in + * + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + public Object run(final InputStream in, final String fileName, String[] args) throws CompilationFailedException { + GroovyCodeSource gcs = AccessController.doPrivileged(new PrivilegedAction<GroovyCodeSource>() { + public GroovyCodeSource run() { + try { + String scriptText = config.getSourceEncoding() != null ? + DefaultGroovyMethods.getText(in, config.getSourceEncoding()) : + DefaultGroovyMethods.getText(in); + return new GroovyCodeSource(scriptText, fileName, DEFAULT_CODE_BASE); + } catch (IOException e) { + throw new RuntimeException("Impossible to read the content of the input stream for file named: " + fileName, e); + } + } + }); + Class scriptClass = parseClass(gcs); + return runScriptOrMainOrTestOrRunnable(scriptClass, args); + } + public Object getVariable(String name) { return context.getVariables().get(name); } @@ -618,6 +655,37 @@ public class GroovyShell extends GroovyO } } + /** + * Evaluates some script against the current Binding and returns the result + * + * @param in the stream reading the script + * + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + public Object evaluate(InputStream in) throws CompilationFailedException { + return evaluate(in, generateScriptName()); + } + + /** + * Evaluates some script against the current Binding and returns the result + * + * @param in the stream reading the script + * @param fileName is the logical file name of the script (which is used to create the class name of the script) + * + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + public Object evaluate(InputStream in, String fileName) throws CompilationFailedException { + Script script = null; + try { + script = parse(in, fileName); + script.setBinding(context); + return script.run(); + } finally { + if (script != null) { + InvokerHelper.removeClass(script.getClass()); + } + } + } /** * Parses the given script and returns it ready to be run @@ -631,6 +699,31 @@ public class GroovyShell extends GroovyO } /** + * Parses the given script and returns it ready to be run + * + * @param in the stream reading the script + * @param fileName is the logical file name of the script (which is used to create the class name of the script) + * @return the parsed script which is ready to be run via @link Script.run() + * + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + public Script parse(final InputStream in, final String fileName) throws CompilationFailedException { + GroovyCodeSource gcs = AccessController.doPrivileged(new PrivilegedAction<GroovyCodeSource>() { + public GroovyCodeSource run() { + try { + String scriptText = config.getSourceEncoding() != null ? + DefaultGroovyMethods.getText(in, config.getSourceEncoding()) : + DefaultGroovyMethods.getText(in); + return new GroovyCodeSource(scriptText, fileName, DEFAULT_CODE_BASE); + } catch (IOException e) { + throw new RuntimeException("Impossible to read the content of the input stream for file named: " + fileName, e); + } + } + }); + return parse(gcs); + } + + /** * Parses the groovy code contained in codeSource and returns a java class. */ private Class parseClass(final GroovyCodeSource codeSource) throws CompilationFailedException { @@ -686,6 +779,17 @@ public class GroovyShell extends GroovyO return parse(in, generateScriptName()); } + /** + * Parses the given script and returns it ready to be run + * + * @param in the stream reading the script + * + * @deprecated Prefer using methods taking a Reader rather than an InputStream to avoid wrong encoding issues. + */ + public Script parse(InputStream in) throws CompilationFailedException { + return parse(in, generateScriptName()); + } + protected synchronized String generateScriptName() { return "Script" + (++counter) + ".groovy"; }
  75. Download patch src/main/groovy/grape/GrabAnnotationTransformation.java
  76. Download patch gradle.properties

    --- 2.0.0~beta2-1/gradle.properties 2011-12-23 19:01:22.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradle.properties 2012-02-09 22:26:44.000000000 +0000 @@ -1,6 +1,6 @@ -groovyVersion = 2.0.0-beta-2 +groovyVersion = 1.8.6 # bundle version format: major('.'minor('.'micro('.'qualifier)?)?)? (first 3 only digits) -groovyBundleVersion = 2.0.0.beta-2 +groovyBundleVersion = 1.8.6 # Many people have reported problems testing UberTestCaseGroovySourceSubPackages, others have no difficulties with the default # values ant junit task uses. The decision has been taken to provide the values to try and cause the least
  77. Download patch .gradle/1.0-milestone-6/outputFileStates/cache.properties

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/outputFileStates/cache.properties 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/outputFileStates/cache.properties 2012-01-27 14:22:02.000000000 +0000 @@ -0,0 +1 @@ +#Fri Jan 27 09:52:01 CET 2012
  78. Download patch build.xml
  79. Download patch src/main/groovy/json/JsonLexer.java

    --- 2.0.0~beta2-1/src/main/groovy/json/JsonLexer.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/json/JsonLexer.java 2012-02-09 20:55:10.000000000 +0000 @@ -105,12 +105,17 @@ public class JsonLexer implements Iterat StringBuilder currentContent = new StringBuilder("\""); // consume the first double quote starting the string reader.read(); + boolean isEscaped = false; for (;;) { int read = reader.read(); if (read == -1) return null; - currentContent.append((char) read); - if (currentContent.charAt(currentContent.length() - 1) == '"' && currentContent.charAt(currentContent.length() - 2) != '\\' && + isEscaped = (!isEscaped && currentContent.charAt(currentContent.length() - 1) == '\\'); + + char charRead = (char) read; + currentContent.append(charRead); + + if (charRead == '"' && !isEscaped && possibleTokenType.matching(currentContent.toString())) { token.setEndLine(reader.getLine()); token.setEndColumn(reader.getColumn()); @@ -248,4 +253,4 @@ public class JsonLexer implements Iterat throw new UnsupportedOperationException("The method remove() is not supported on this lexer."); } -} \ No newline at end of file +}
  80. Download patch config/maven/groovy-tools.pom

    --- 2.0.0~beta2-1/config/maven/groovy-tools.pom 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/config/maven/groovy-tools.pom 2012-02-09 20:55:10.000000000 +0000 @@ -53,7 +53,7 @@ <dependency> <groupId>asm</groupId> <artifactId>asm</artifactId> - <version>3.3.1</version> + <version>3.2</version> </dependency> <!-- used for the JavaDoc generator script -->
  81. Download patch src/main/groovy/grape/GrapeEngine.java

    --- 2.0.0~beta2-1/src/main/groovy/grape/GrapeEngine.java 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/grape/GrapeEngine.java 2012-02-06 15:05:22.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2008 the original author or authors. + * Copyright 2008-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +20,7 @@ import java.util.Map; import java.net.URI; /** - * User: Danno.Ferrin - * Date: Sep 30, 2008 - * Time: 9:30:46 PM + * @author Danno Ferrin */ public interface GrapeEngine {
  82. Download patch src/main/org/codehaus/groovy/antlr/groovy.g

    --- 2.0.0~beta2-1/src/main/org/codehaus/groovy/antlr/groovy.g 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/org/codehaus/groovy/antlr/groovy.g 2012-02-09 20:55:10.000000000 +0000 @@ -226,7 +226,7 @@ tokens { STATIC_IMPORT; ENUM_DEF; ENUM_CONSTANT_DEF; FOR_EACH_CLAUSE; ANNOTATION_DEF; ANNOTATIONS; ANNOTATION; ANNOTATION_MEMBER_VALUE_PAIR; ANNOTATION_FIELD_DEF; ANNOTATION_ARRAY_INIT; TYPE_ARGUMENTS; TYPE_ARGUMENT; TYPE_PARAMETERS; TYPE_PARAMETER; WILDCARD_TYPE; - TYPE_UPPER_BOUNDS; TYPE_LOWER_BOUNDS; CLOSURE_LIST;MULTICATCH;MULTICATCH_TYPES; + TYPE_UPPER_BOUNDS; TYPE_LOWER_BOUNDS; CLOSURE_LIST; } { @@ -415,7 +415,7 @@ tokens { } private void dumpTree(AST ast, String offset) { - dump(ast, offset); + dump(ast, offset); for (AST node = ast.getFirstChild(); node != null; node = node.getNextSibling()) { dumpTree(node, offset+"\t"); } @@ -765,7 +765,6 @@ wildcardType typeArgumentsDiamond {Token first = LT(1);} : LT! GT! nls! - {#typeArgumentsDiamond = #(create(TYPE_ARGUMENTS, "TYPE_ARGUMENTS",first,LT(1)), #typeArgumentsDiamond);} ; // Type arguments to a class or interface type @@ -1664,26 +1663,6 @@ parameterDeclaration! } ; -multicatch_types -{Token first = LT(1);} - : - nls! - classOrInterfaceType[false] - ( - BOR! nls! classOrInterfaceType[false] - )* - - {#multicatch_types = #(create(MULTICATCH_TYPES, "MULTICATCH_TYPES",first,LT(1)), #multicatch_types);} - ; - -multicatch -{Token first = LT(1);} - : nls! (FINAL)? ("def")? (m:multicatch_types)? id:IDENT! - { - #multicatch = #(create(MULTICATCH,"MULTICATCH",first, LT(1)),m,id); - } - ; - /*OBS* variableLengthParameterDeclaration! {Token first = LT(1);} : pm:parameterModifier t:typeSpec[false] TRIPLE_DOT! id:IDENT @@ -2199,7 +2178,7 @@ finallyClause {Token first = LT(1);} // an exception handler handler {Token first = LT(1);} - : "catch"! LPAREN! pd:multicatch! RPAREN! nlsWarn! handlerCs:compoundStatement! + : "catch"! LPAREN! pd:parameterDeclaration! RPAREN! nlsWarn! handlerCs:compoundStatement! {#handler = #(create(LITERAL_catch,"catch",first,LT(1)),pd,handlerCs);} ; @@ -2210,7 +2189,7 @@ handler {Token first = LT(1);} */ commandArguments[AST head] { - Token first = LT(1); + Token first = LT(1); } : commandArgument ( options {greedy=true;}: COMMA! nls! commandArgument )* @@ -2231,7 +2210,7 @@ commandArguments[AST head] commandArgumentsGreedy[AST head] { - AST prev = #head; + AST prev = #head; } : @@ -4187,22 +4166,6 @@ options { // TODO: Recognize all the Java identifier parts here (except '$'). ; -protected -DIGITS_WITH_UNDERSCORE -options { - paraphrase="a sequence of digits and underscores, bordered by digits"; -} - : DIGIT (DIGITS_WITH_UNDERSCORE_OPT)? - ; - -protected -DIGITS_WITH_UNDERSCORE_OPT -options { - paraphrase="a sequence of digits and underscores with maybe underscore starting"; -} - : (DIGIT | '_')* DIGIT - ; - // a numeric literal NUM_INT options { @@ -4230,29 +4193,27 @@ options { *OBS*/ // TODO: This complex pattern seems wrong. Verify or fix. ( '0' {isDecimal = true;} // special case for just '0' - ( // hex digits - ('x'|'X') - {isDecimal = false;} - HEX_DIGIT - ( options { warnWhenFollowAmbig=false; } - : (options { warnWhenFollowAmbig=false; } : HEX_DIGIT | '_')* - HEX_DIGIT - )? - - | //binary literal - ('b'|'B') ('0'|'1') (('0'|'1'|'_')* ('0'|'1'))? + ( ('x'|'X') {isDecimal = false;} + ( // hex + // the 'e'|'E' and float suffix stuff look + // like hex digits, hence the (...)+ doesn't + // know when to stop: ambig. ANTLR resolves + // it correctly by matching immediately. It + // is therefor ok to hush warning. + options { + warnWhenFollowAmbig=false; + } + : HEX_DIGIT + )+ | //float or double with leading zero - ( DIGITS_WITH_UNDERSCORE - ( '.' DIGITS_WITH_UNDERSCORE | EXPONENT | FLOAT_SUFFIX) - ) => DIGITS_WITH_UNDERSCORE + (('0'..'9')+ ('.'('0'..'9')|EXPONENT|FLOAT_SUFFIX)) => ('0'..'9')+ - | // octal - ('0'..'7') (('0'..'7'|'_')* ('0'..'7'))? + | ('0'..'7')+ // octal {isDecimal = false;} )? - | ('1'..'9') (DIGITS_WITH_UNDERSCORE_OPT)? {isDecimal=true;} // non-zero decimal + | ('1'..'9') ('0'..'9')* {isDecimal=true;} // non-zero decimal ) ( ('l'|'L') { _ttype = NUM_LONG; } | ('i'|'I') { _ttype = NUM_INT; } @@ -4262,7 +4223,7 @@ options { | (~'.' | '.' ('0'..'9')) => {isDecimal}? - ( '.' DIGITS_WITH_UNDERSCORE (e:EXPONENT)? (f2:FLOAT_SUFFIX {t=f2;} | g2:BIG_SUFFIX {t=g2;})? + ( '.' ('0'..'9')+ (EXPONENT)? (f2:FLOAT_SUFFIX {t=f2;} | g2:BIG_SUFFIX {t=g2;})? | EXPONENT (f3:FLOAT_SUFFIX {t=f3;} | g3:BIG_SUFFIX {t=g3;})? | f4:FLOAT_SUFFIX {t=f4;} ) @@ -4294,7 +4255,7 @@ EXPONENT options { paraphrase="an exponent"; } - : ('e'|'E') ('+'|'-')? ('0'..'9'|'_')* ('0'..'9') + : ('e'|'E') ('+'|'-')? ('0'..'9')+ ;
  83. Download patch src/main/groovy/util/ConfigSlurper.groovy

    --- 2.0.0~beta2-1/src/main/groovy/util/ConfigSlurper.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/ConfigSlurper.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -15,6 +15,7 @@ */ package groovy.util +import java.beans.Introspector import java.beans.BeanInfo import org.codehaus.groovy.runtime.InvokerHelper @@ -77,6 +78,7 @@ class ConfigSlurper { def tokens = key.split(/\./) def current = config + def currentToken def last def lastToken def foundBase = false
  84. Download patch src/main/groovy/swing/impl/Startable.java

    --- 2.0.0~beta2-1/src/main/groovy/swing/impl/Startable.java 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/impl/Startable.java 2012-02-09 20:55:10.000000000 +0000 @@ -0,0 +1,29 @@ +/* + * Copyright 2003-2007 the original author or authors. + * + * 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 under the License. + */ +package groovy.swing.impl; + +/** + * A simple lifecycle method called when an object is fully constructed. + * + * @author <a href="mailto:james@coredevelopers.net">James Strachan</a> + * @version $Revision$ + * @deprecated This interface is no longer used internally and there + * exists no equivalent functionality. + * Superceded by FactoryBuilderSupport handling. + */ +public interface Startable { + void start(); +}
  85. Download patch src/examples/transforms/global/CompiledAtExample.groovy

    --- 2.0.0~beta2-1/src/examples/transforms/global/CompiledAtExample.groovy 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/examples/transforms/global/CompiledAtExample.groovy 2012-02-09 20:55:10.000000000 +0000 @@ -6,10 +6,10 @@ package transforms.global * @author Hamlet D'Arcy */ -println 'Script compiled at: ' + compiledTime +println 'Script compiled at: ' + getCompiledTime() class MyClass { } -println 'Class compiled at: ' + MyClass.compiledTime +println 'Class compiled at: ' + MyClass.getCompiledTime()
  86. Download patch src/main/groovy/inspect/swingui/AstNodeToScriptAdapter.groovy

    --- 2.0.0~beta2-1/src/main/groovy/inspect/swingui/AstNodeToScriptAdapter.groovy 2011-12-16 05:24:20.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/inspect/swingui/AstNodeToScriptAdapter.groovy 2012-02-09 20:50:34.000000000 +0000 @@ -448,7 +448,7 @@ class AstNodeToScriptVisitor extends Pri Expression exp = node.initialValueExpression if (exp instanceof ConstantExpression) exp = Verifier.transformToPrimitiveConstantIfPossible(exp) ClassNode type = exp?.type - if (Modifier.isStatic(node.modifiers) + if (Modifier.isStatic(node.modifiers) && Modifier.isFinal(node.getModifiers()) && exp instanceof ConstantExpression && type == node.type && ClassHelper.isStaticConstantInitializerType(type)) {
  87. Download patch src/main/groovy/transform/TypeChecked.java

    --- 2.0.0~beta2-1/src/main/groovy/transform/TypeChecked.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/transform/TypeChecked.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -/* - * Copyright 2003-2011 the original author or authors. - * - * 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 under the License. - */ -package groovy.transform; - -import java.lang.annotation.*; - -import org.codehaus.groovy.transform.GroovyASTTransformationClass; - -/** - * This will let the Groovy compiler use compile time checks in the style of Java. - * @author <a href="mailto:blackdrag@gmx.org">Jochen "blackdrag" Theodorou</a> - */ -@java.lang.annotation.Documented -@Retention(RetentionPolicy.SOURCE) -@Target({ ElementType.METHOD, ElementType.TYPE, - ElementType.CONSTRUCTOR -}) -@GroovyASTTransformationClass("org.codehaus.groovy.transform.StaticTypesTransformation") -public @interface TypeChecked { -} \ No newline at end of file
  88. Download patch src/main/groovy/swing/factory/ComponentFactory.groovy

    --- 2.0.0~beta2-1/src/main/groovy/swing/factory/ComponentFactory.groovy 2011-08-30 16:20:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/swing/factory/ComponentFactory.groovy 2012-02-07 18:53:16.000000000 +0000 @@ -18,6 +18,8 @@ package groovy.swing.factory import java.awt.Component import java.awt.Window +import javax.swing.JComponent +import static groovy.swing.factory.LayoutFactory.DEFAULT_DELEGATE_PROPERTY_CONSTRAINT class ComponentFactory extends BeanFactory { @@ -37,6 +39,9 @@ class ComponentFactory extends BeanFacto def constraints = builder.context.constraints if (constraints != null) { LayoutFactory.getLayoutTarget(parent).add(child, constraints) + if (child instanceof JComponent) { + child.putClientProperty(DEFAULT_DELEGATE_PROPERTY_CONSTRAINT, constraints) + } builder.context.remove('constraints') } else { LayoutFactory.getLayoutTarget(parent).add(child)
  89. Download patch src/main/groovy/sql/Sql.java

    --- 2.0.0~beta2-1/src/main/groovy/sql/Sql.java 2011-12-06 17:28:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/sql/Sql.java 2012-02-06 15:03:26.000000000 +0000 @@ -362,34 +362,42 @@ public class Sql { * @throws ClassNotFoundException if the class cannot be found or loaded */ public static Sql newInstance(Map<String, Object> args) throws SQLException, ClassNotFoundException { + if (!args.containsKey("url")) + throw new IllegalArgumentException("Argument 'url' is required"); + + if (args.get("url") == null) + throw new IllegalArgumentException("Argument 'url' must not be null"); + if (args.containsKey("driverClassName") && args.containsKey("driver")) throw new IllegalArgumentException("Only one of 'driverClassName' and 'driver' should be provided"); - Object driverClassName = args.remove("driverClassName"); - if (driverClassName == null) driverClassName = args.remove("driver"); - if (driverClassName != null) loadDriver(driverClassName.toString()); - Object url = args.remove("url"); - if (url == null) throw new IllegalArgumentException("Argument 'url' is required"); + // Make a copy so destructive operations will not affect the caller + Map<String, Object> sqlArgs = new HashMap<String, Object>(args); + + Object driverClassName = sqlArgs.remove("driverClassName"); + if (driverClassName == null) driverClassName = sqlArgs.remove("driver"); + if (driverClassName != null) loadDriver(driverClassName.toString()); - Properties props = (Properties) args.remove("properties"); - if (props != null && args.containsKey("user")) + Properties props = (Properties) sqlArgs.remove("properties"); + if (props != null && sqlArgs.containsKey("user")) throw new IllegalArgumentException("Only one of 'properties' and 'user' should be supplied"); - if (props != null && args.containsKey("password")) + if (props != null && sqlArgs.containsKey("password")) throw new IllegalArgumentException("Only one of 'properties' and 'password' should be supplied"); - if (args.containsKey("user") ^ args.containsKey("password")) + if (sqlArgs.containsKey("user") ^ sqlArgs.containsKey("password")) throw new IllegalArgumentException("Found one but not both of 'user' and 'password'"); + Object url = sqlArgs.remove("url"); Connection connection; - if (props != null) connection = DriverManager.getConnection(url.toString(), props); - else if (args.containsKey("user")) { - Object user = args.remove("user"); - Object password = args.remove("password"); + if (props != null) connection = DriverManager.getConnection(url.toString(), new Properties(props)); + else if (sqlArgs.containsKey("user")) { + Object user = sqlArgs.remove("user"); + Object password = sqlArgs.remove("password"); connection = DriverManager.getConnection(url.toString(), (user == null ? null : user.toString()), (password == null ? null : password.toString())); } else connection = DriverManager.getConnection(url.toString()); - Sql result = (Sql) InvokerHelper.invokeConstructorOf(Sql.class, args); + Sql result = (Sql) InvokerHelper.invokeConstructorOf(Sql.class, sqlArgs); result.setConnection(connection); return result; }
  90. Download patch src/main/groovy/util/slurpersupport/Node.java

    --- 2.0.0~beta2-1/src/main/groovy/util/slurpersupport/Node.java 2011-12-06 17:28:16.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/util/slurpersupport/Node.java 2012-02-06 15:03:26.000000000 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2003-2010 the original author or authors. + * Copyright 2003-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -88,7 +88,6 @@ public class Node implements Writable { }); } - protected void replaceBody(final Object newValue) { this.children.clear(); this.children.add(newValue); @@ -112,18 +111,15 @@ public class Node implements Writable { * @see org.codehaus.groovy.sandbox.util.slurpersupport.Node#text() */ public String text() { - final StringBuffer buff = new StringBuffer(); - final Iterator iter = this.children.iterator(); - while (iter.hasNext()) { - final Object child = iter.next(); - + final StringBuilder sb = new StringBuilder(); + for (Object child : this.children) { if (child instanceof Node) { - buff.append(((Node) child).text()); + sb.append(((Node) child).text()); } else { - buff.append(child); + sb.append(child); } } - return buff.toString(); + return sb.toString(); } /* (non-Javadoc) @@ -154,7 +150,6 @@ public class Node implements Writable { private Object getNextElementNodes() { while (iter.hasNext()) { final Object node = iter.next(); - if (node instanceof Node) { return node; } @@ -169,9 +164,7 @@ public class Node implements Writable { */ public Writer writeTo(final Writer out) throws IOException { if (this.replacementNodeStack.empty()) { - final Iterator iter = this.children.iterator(); - while (iter.hasNext()) { - final Object child = iter.next(); + for (Object child : this.children) { if (child instanceof Writable) { ((Writable) child).writeTo(out); } else { @@ -179,7 +172,6 @@ public class Node implements Writable { } } return out; - } else { return ((Writable) this.replacementNodeStack.peek()).writeTo(out); } @@ -190,7 +182,6 @@ public class Node implements Writable { final Closure rest = new Closure(null) { public Object doCall(final Object o) { buildChildren(builder, namespaceMap, namespaceTagHints); - return null; } }; @@ -210,18 +201,13 @@ public class Node implements Writable { builder.invokeMethod(this.name, new Object[]{this.attributes, rest}); } else { final Map attributesWithNamespaces = new HashMap(this.attributes); - final Iterator attrs = this.attributes.keySet().iterator(); - - while (attrs.hasNext()) { - final Object key = attrs.next(); + for (Object key : this.attributes.keySet()) { final Object attributeNamespaceURI = this.attributeNamespaces.get(key); - if (attributeNamespaceURI != null) { attributesWithNamespaces.put(getTagFor(attributeNamespaceURI, current, pending, namespaceMap, namespaceTagHints, newTags, builder) + "$" + key, attributesWithNamespaces.remove(key)); } } - builder.getProperty(getTagFor(this.namespaceURI, current, pending, namespaceMap, namespaceTagHints, newTags, builder)); builder.invokeMethod(this.name, new Object[]{attributesWithNamespaces, rest}); } @@ -229,7 +215,6 @@ public class Node implements Writable { // remove the new tags we had to define for this element if (!newTags.isEmpty()) { final Iterator iter = newTags.iterator(); - do { pending.remove(iter.next()); } while (iter.hasNext()); @@ -257,7 +242,6 @@ public class Node implements Writable { if (tag == null || tag.length() == 0) { // otherwise make up a new tag and check it has not been used before int suffix = 0; - do { final String possibleTag = "tag" + suffix++; @@ -279,9 +263,8 @@ public class Node implements Writable { private static String findNamespaceTag(final Map tagMap, final Object namespaceURI) { if (tagMap.containsValue(namespaceURI)) { - final Iterator entries = tagMap.entrySet().iterator(); - while (entries.hasNext()) { - final Map.Entry entry = (Map.Entry) entries.next(); + for (Object o : tagMap.entrySet()) { + final Map.Entry entry = (Map.Entry) o; if (namespaceURI.equals(entry.getValue())) { return (String) entry.getKey(); } @@ -291,9 +274,7 @@ public class Node implements Writable { } private void buildChildren(final GroovyObject builder, final Map namespaceMap, final Map<String, String> namespaceTagHints) { - final Iterator iter = this.children.iterator(); - while (iter.hasNext()) { - final Object child = iter.next(); + for (Object child : this.children) { if (child instanceof Node) { ((Node) child).build(builder, namespaceMap, namespaceTagHints); } else if (child instanceof Buildable) {
  91. Download patch .project

    --- 2.0.0~beta2-1/.project 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.project 2012-02-09 20:55:10.000000000 +0000 @@ -1,29 +1,28 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>groovy</name> - <comment>Groovy: A powerful, dynamic language for the JVM</comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> - <triggers>full,incremental,</triggers> - <arguments> - <dictionary> - <key>LaunchConfigHandle</key> - <value>&lt;project&gt;/.externalToolBuilders/Groovy ensureGrammars.launch</value> - </dictionary> - </arguments> - </buildCommand> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.groovy.core.groovyNature</nature> - <nature>org.eclipse.jdt.core.javanature</nature> - <nature>org.codehaus.groovy.eclipse.groovyNature</nature> - </natures> + <name>groovy</name> + <comment>Groovy: A powerful, dynamic language for the JVM</comment> + <projects/> + <buildSpec> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value>&lt;project&gt;/.externalToolBuilders/Groovy ensureGrammars.launch</value> + </dictionary> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + </buildCommand> + <buildCommand> + <name>org.codehaus.groovy.eclipse.groovyBuilder</name> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.codehaus.groovy.eclipse.groovyNature</nature> + </natures> </projectDescription>
  92. Download patch .gradle/1.0-milestone-6/taskArtifacts/cache.properties

    --- 2.0.0~beta2-1/.gradle/1.0-milestone-6/taskArtifacts/cache.properties 1970-01-01 00:00:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/.gradle/1.0-milestone-6/taskArtifacts/cache.properties 2012-01-27 14:18:30.000000000 +0000 @@ -0,0 +1 @@ +#Fri Jan 27 09:48:29 CET 2012
  93. Download patch gradle/assemble.gradle

    --- 2.0.0~beta2-1/gradle/assemble.gradle 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/gradle/assemble.gradle 2012-02-09 20:55:10.000000000 +0000 @@ -110,8 +110,6 @@ task jarAll(type: Jar, dependsOn: jar) { }.each {jarjarFile -> zipfileset(src: jarjarFile) } - zipfileset(src: configurations.runtime.files.find { file -> file.name.startsWith('asm-util') }, - includes: 'org/objectweb/asm/util/AbstractVisitor.class,org/objectweb/asm/util/Trace*') rule pattern: "antlr.**", result: "groovyjarjarantlr.@1" rule pattern: "org.objectweb.**", result: "groovyjarjarasm.@1" rule pattern: "org.apache.commons.cli.**", result: "groovyjarjarcommonscli.@1"
  94. Download patch src/bin/groovysh.bat

    --- 2.0.0~beta2-1/src/bin/groovysh.bat 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/bin/groovysh.bat 2012-02-09 20:55:10.000000000 +0000 @@ -12,7 +12,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=.\ -set CLASSNAME=org.codehaus.groovy.tools.shell.Main +set CLASSNAME=groovy.ui.InteractiveShell +if "%OLDSHELL%" == "" set CLASSNAME=org.codehaus.groovy.tools.shell.Main "%DIRNAME%\startGroovy.bat" "%DIRNAME%" %CLASSNAME% %*
  95. Download patch config/codenarc/codenarc.groovy
  96. Download patch src/main/org/codehaus/groovy/antlr/parser/GroovyLexer.java
  97. Download patch src/main/groovy/util/FactoryBuilderSupport.java
  98. Download patch src/main/groovy/ui/GroovyMain.java

    --- 2.0.0~beta2-1/src/main/groovy/ui/GroovyMain.java 2011-12-21 14:42:00.000000000 +0000 +++ 2.0.0~beta2+isreally1.8.6-0ubuntu1/src/main/groovy/ui/GroovyMain.java 2012-02-09 20:55:10.000000000 +0000 @@ -23,6 +23,7 @@ import groovy.lang.Script; import java.io.*; import java.math.BigInteger; +import java.net.MalformedURLException; import java.net.URL; import java.util.Iterator; import java.util.List; @@ -233,10 +234,6 @@ public class GroovyMain { .withDescription("split lines using splitPattern (default '\\s') using implicit 'split' variable") .withLongOpt("autosplit") .create('a')); - options.addOption( - OptionBuilder.withLongOpt("indy") - .withDescription("enables compilation using invokedynamic") - .create()); return options; } @@ -321,10 +318,6 @@ public class GroovyMain { main.conf.getOptimizationOptions().put(deopt_i,false); } - if (line.hasOption("indy")) { - main.conf.getOptimizationOptions().put("indy", true); - } - main.args = args; return main.run();
  99. Download patch .settings/org.eclipse.jdt.core.prefs
  100. Download patch .pc/0002-ant-build.diff.patch/build.xml
  101. ...

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: hessian

hessian (4.0.6-1ubuntu1) quantal; urgency=low * Transition libservlet2.5-java -> libservlet3.0-java (LP: #1023405). -- James Page <james.page@ubuntu.com> Thu, 12 Jul 2012 15:14:19 +0100 hessian (4.0.6-1build1) quantal; urgency=low * No-change rebuild with openjdk-7 as default-jdk. -- James Page <james.page@ubuntu.com> Fri, 18 May 2012 11:39:19 +0100

Modifications :
  1. Download patch debian/rules

    --- 4.0.6-1/debian/rules 2010-06-01 18:33:55.000000000 +0000 +++ 4.0.6-1ubuntu1/debian/rules 2012-07-12 14:11:32.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/make -f export JAVA_HOME=/usr/lib/jvm/default-java -export CLASSPATH=/usr/share/java/servlet-api-2.5.jar +export CLASSPATH=/usr/share/java/servlet-api-3.0.jar %: dh --with javahelper $@
  2. Download patch debian/control

    --- 4.0.6-1/debian/control 2010-06-01 18:33:55.000000000 +0000 +++ 4.0.6-1ubuntu1/debian/control 2012-07-12 14:11:52.000000000 +0000 @@ -1,10 +1,11 @@ Source: hessian -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Miguel Landaeta <miguel@miguel.cc> Section: java Priority: optional Build-Depends: debhelper (>= 7.0.50), default-jdk, javahelper, - libservlet2.5-java + libservlet3.0-java Standards-Version: 3.8.4 Homepage: http://hessian.caucho.com/ Vcs-Git: git://git.debian.org/git/pkg-java/hessian.git @@ -12,7 +13,7 @@ Vcs-Browser: http://git.debian.org/?p=pk Package: libhessian-java Architecture: all -Depends: libservlet2.5-java, ${misc:Depends} +Depends: libservlet3.0-java, ${misc:Depends} Suggests: libhessian-java-doc (= ${binary:Version}) Description: Java implementation of a binary protocol for web services Hessian provides compact binary and XML protocols for applications

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: httpcomponents-client

httpcomponents-client (4.1.1-2ubuntu1) quantal; urgency=low * Transition package to default java implementation: - d/control: Drop preferred BD on openjdk-6-jdk. -- James Page <james.page@ubuntu.com> Wed, 01 Aug 2012 15:05:14 +0100

Modifications :
  1. Download patch debian/control

    --- 4.1.1-2/debian/control 2012-04-01 23:31:57.000000000 +0000 +++ 4.1.1-2ubuntu1/debian/control 2012-08-01 14:00:10.000000000 +0000 @@ -1,11 +1,12 @@ Source: httpcomponents-client Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Miguel Landaeta <miguel@miguel.cc>, Jakub Adam <jakub.adam@ktknet.cz> Build-Depends: debhelper (>= 7.0.50~) - , openjdk-6-jdk | default-jdk + , default-jdk , maven-debian-helper , maven-repo-helper , javahelper

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jakarta-taglibs-standard

jakarta-taglibs-standard (1.1.2-2ubuntu1) quantal; urgency=low * Merge from Debian unstable. Remaining changes: - Transition from servlet 2.5 -> 3.0. -- James Page <james.page@ubuntu.com> Mon, 16 Jul 2012 14:09:09 +0100

Modifications :
  1. Download patch debian/rules

    --- 1.1.2-2/debian/rules 2012-06-19 22:37:16.000000000 +0000 +++ 1.1.2-2ubuntu1/debian/rules 2012-07-16 13:09:02.000000000 +0000 @@ -1,7 +1,7 @@ #!/usr/bin/make -f export JAVA_HOME=/usr/lib/jvm/default-java -export CLASSPATH=/usr/share/java/el-api-2.1.jar +export CLASSPATH=/usr/share/java/el-api-2.2.jar DEB_UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+)-.*,\1,p') MAVEN_REPO := http://repo1.maven.org/maven2
  2. Download patch debian/control

    --- 1.1.2-2/debian/control 2012-06-19 22:38:14.000000000 +0000 +++ 1.1.2-2ubuntu1/debian/control 2012-07-16 13:08:29.000000000 +0000 @@ -1,7 +1,8 @@ Source: jakarta-taglibs-standard Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Onkar Shinde <onkarshinde@ubuntu.com>, James Page <james.page@ubuntu.com> @@ -10,7 +11,7 @@ Build-Depends: debhelper (>= 7.0.50~), javahelper, maven-repo-helper (>= 1.5~) -Build-Depends-Indep: default-jdk, libservlet2.5-java, libxalan2-java +Build-Depends-Indep: default-jdk, libservlet3.0-java, libxalan2-java Standards-Version: 3.9.3 DM-Upload-Allowed: yes Vcs-Git: git://git.debian.org/git/pkg-java/jakarta-taglibs-standard.git
  3. Download patch debian/ant.properties

    --- 1.1.2-2/debian/ant.properties 2012-06-19 22:37:16.000000000 +0000 +++ 1.1.2-2ubuntu1/debian/ant.properties 2012-06-20 03:41:23.000000000 +0000 @@ -2,6 +2,6 @@ build.dir=build dist.dir=dist ant.build.javac.source=1.4 ant.build.javac.target=1.4 -servlet24.jar=/usr/share/java/servlet-api-2.5.jar -jsp20.jar=/usr/share/java/jsp-api-2.1.jar +servlet24.jar=/usr/share/java/servlet-api-3.0.jar +jsp20.jar=/usr/share/java/jsp-api-2.2.jar xalan.jar=/usr/share/java/xalan2.jar

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: java3d

java3d (1.5.2+dfsg-8ubuntu1) quantal; urgency=low * 02_fix_generic_ftbfs.patch: Link with gcc -shared, not ld, don't explicitly link with libc (Colin Watson, Matthias Klose). Closes: #559767. -- Colin Watson <cjwatson@ubuntu.com> Fri, 12 Oct 2012 17:45:28 +0100

Modifications :
  1. Download patch debian/control

    --- 1.5.2+dfsg-8/debian/control 2011-09-13 03:03:12.000000000 +0000 +++ 1.5.2+dfsg-8ubuntu1/debian/control 2012-10-12 16:47:58.000000000 +0000 @@ -1,7 +1,8 @@ Source: java3d Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Onkar Shinde <onkarshinde@ubuntu.com>, Torsten Werner <twerner@debian.org> Build-Depends: debhelper (>= 7), cdbs, default-jdk, ant-optional, libvecmath-java, mesa-common-dev, libgl1-mesa-dev, libxext-dev, libxt-dev
  2. Download patch j3d-core/src/native/ogl/build-linux-generic.xml

    --- 1.5.2+dfsg-8/j3d-core/src/native/ogl/build-linux-generic.xml 2012-10-19 12:24:15.000000000 +0000 +++ 1.5.2+dfsg-8ubuntu1/j3d-core/src/native/ogl/build-linux-generic.xml 2012-10-19 12:24:16.000000000 +0000 @@ -28,8 +28,8 @@ </exec> <!-- Create the library file--> - <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> - <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o -G -z defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -lc -L${java.home}/lib/${os.arch} -ljawt -L${java.home}/lib/${os.arch}/server -ljvm -o libj3dcore-ogl.so"/> + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> + <arg line="-shared DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o -Wl,-z,defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -L${java.home}/lib/${os.arch} -ljawt -L${java.home}/lib/${os.arch}/server -ljvm -o libj3dcore-ogl.so"/> </exec> </target> @@ -41,8 +41,8 @@ </exec> <!-- Create the wrapper library --> - <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> - <arg line="CgWrapper.o -G -z defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -lc -o libj3dcore-ogl-cg.so"/> + <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> + <arg line="-shared CgWrapper.o -Wl,-z,defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -o libj3dcore-ogl-cg.so"/> </exec> </target>
  3. Download patch debian/patches/02_fix_generic_ftbfs.patch

    --- 1.5.2+dfsg-8/debian/patches/02_fix_generic_ftbfs.patch 2010-01-16 19:50:20.000000000 +0000 +++ 1.5.2+dfsg-8ubuntu1/debian/patches/02_fix_generic_ftbfs.patch 2012-10-13 11:11:26.000000000 +0000 @@ -1,7 +1,7 @@ Index: java3d-1.5.2+dfsg/j3d-core/build.xml =================================================================== ---- java3d-1.5.2+dfsg.orig/j3d-core/build.xml 2010-01-09 18:52:55.000000000 +0530 -+++ java3d-1.5.2+dfsg/j3d-core/build.xml 2010-01-09 20:24:13.000000000 +0530 +--- java3d-1.5.2+dfsg.orig/j3d-core/build.xml 2008-05-23 20:31:19.000000000 +0000 ++++ java3d-1.5.2+dfsg/j3d-core/build.xml 2012-10-13 11:09:55.000000000 +0000 @@ -196,6 +196,15 @@ <property name="install.bin" value="lib/ppc"/> </target> @@ -43,8 +43,8 @@ Index: java3d-1.5.2+dfsg/j3d-core/build. </condition> Index: java3d-1.5.2+dfsg/j3d-core/src/native/build.xml =================================================================== ---- java3d-1.5.2+dfsg.orig/j3d-core/src/native/build.xml 2010-01-09 18:52:55.000000000 +0530 -+++ java3d-1.5.2+dfsg/j3d-core/src/native/build.xml 2010-01-09 20:23:04.000000000 +0530 +--- java3d-1.5.2+dfsg.orig/j3d-core/src/native/build.xml 2008-02-28 20:17:58.000000000 +0000 ++++ java3d-1.5.2+dfsg/j3d-core/src/native/build.xml 2012-10-13 11:10:00.000000000 +0000 @@ -45,6 +45,13 @@ <property name="osNativeScreenInfo" value="X11NativeScreenInfo"/> </target> @@ -94,7 +94,7 @@ Index: java3d-1.5.2+dfsg/j3d-core/src/na Index: java3d-1.5.2+dfsg/j3d-core/src/native/ogl/build-linux-generic.xml =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ java3d-1.5.2+dfsg/j3d-core/src/native/ogl/build-linux-generic.xml 2010-01-09 20:23:04.000000000 +0530 ++++ java3d-1.5.2+dfsg/j3d-core/src/native/ogl/build-linux-generic.xml 2012-10-13 11:11:17.000000000 +0000 @@ -0,0 +1,74 @@ +<?xml version="1.0"?> + @@ -126,8 +126,8 @@ Index: java3d-1.5.2+dfsg/j3d-core/src/na + </exec> + + <!-- Create the library file--> -+ <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> -+ <arg line="DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o -G -z defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -lc -L${java.home}/lib/${os.arch} -ljawt -L${java.home}/lib/${os.arch}/server -ljvm -o libj3dcore-ogl.so"/> ++ <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> ++ <arg line="-shared DrawingSurfaceObjectAWT.o Canvas3D.o GraphicsContext3D.o NativeScreenInfo.o NativeConfigTemplate3D.o MasterControl.o GeometryArrayRetained.o Attributes.o CgShaderProgram.o GLSLShaderProgram.o Lights.o -Wl,-z,defs -L/usr/X11R6/lib -ldl -lGL -lX11 -lXext -lm -lnsl -L${java.home}/lib/${os.arch} -ljawt -L${java.home}/lib/${os.arch}/server -ljvm -o libj3dcore-ogl.so"/> + </exec> + + </target> @@ -139,8 +139,8 @@ Index: java3d-1.5.2+dfsg/j3d-core/src/na + </exec> + + <!-- Create the wrapper library --> -+ <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="ld"> -+ <arg line="CgWrapper.o -G -z defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -lc -o libj3dcore-ogl-cg.so"/> ++ <exec dir="${build}/${platform}/${bldType}/native/ogl/objs" executable="gcc"> ++ <arg line="-shared CgWrapper.o -Wl,-z,defs -L/usr/X11R6/lib -ldl -lCg -lCgGL -lpthread -lGL -lX11 -lXext -lm -lnsl -o libj3dcore-ogl-cg.so"/> + </exec> + + </target>

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: javadap

javadap (2.2-1ubuntu1) quantal; urgency=low * Build-depend on libservlet3.0-java rather than libservlet2.5-java. -- Colin Watson <cjwatson@ubuntu.com> Mon, 01 Oct 2012 12:56:40 +0100

Modifications :
  1. Download patch debian/control

    --- 2.2-1/debian/control 2012-04-05 10:21:45.000000000 +0000 +++ 2.2-1ubuntu1/debian/control 2012-10-01 11:56:36.000000000 +0000 @@ -1,10 +1,11 @@ Source: javadap Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Mathieu Malaterre <malat@debian.org> Build-Depends: debhelper (>= 8), default-jdk, ant, javahelper (>= 0.25) -Build-Depends-Indep: libjdom1-java, libcommons-httpclient-java, junit, libservlet2.5-java +Build-Depends-Indep: libjdom1-java, libcommons-httpclient-java, junit, libservlet3.0-java Standards-Version: 3.9.3 Homepage: http://opendap.org Vcs-Svn: svn://svn.debian.org/pkg-java/trunk/javadap

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: javatools

javatools (0.43ubuntu2) quantal; urgency=low * jh_installeclipse: Allow any installed package to provide a .jar dependency, not just those with desired-state install. -- Colin Watson <cjwatson@ubuntu.com> Tue, 02 Oct 2012 21:07:09 +0100 javatools (0.43ubuntu1) quantal; urgency=low * Merge from Debian unstable. Remaining changes: - Pre-generate tutorial.html; remove the build dependency on markdown. -- James Page <james.page@ubuntu.com> Fri, 22 Jun 2012 09:07:29 +0100

Modifications :
  1. Download patch debian/rules

    --- 0.43/debian/rules 2012-01-10 21:07:27.000000000 +0000 +++ 0.43ubuntu2/debian/rules 2012-06-20 22:04:30.000000000 +0000 @@ -29,8 +29,10 @@ override_dh_auto_build: jh_lib.sh # jarwrapper pod-based manpages $(POD2MAN) -s 1 jarwrapper.pod tmp.jarwrapper/jarwrapper.1 $(POD2MAN) -s 1 jardetector.pod tmp.jarwrapper/jardetector.1 - markdown --html4tags tutorial.txt | \ - cat tutorial-header.html - tutorial-footer.html > tutorial.html + if which markdown >/dev/null 2>&1; then \ + markdown --html4tags tutorial.txt | \ + cat tutorial-header.html - tutorial-footer.html > tutorial.html; \ + fi runtests: jh_lib.sh cd tests && ./tests.sh @@ -38,5 +40,5 @@ runtests: jh_lib.sh override_dh_auto_test: runtests override_dh_auto_clean: - rm -f jh_lib.sh tutorial.html + rm -f jh_lib.sh #tutorial.html rm -fr tmp tmp.jarwrapper
  2. Download patch debian/control

    --- 0.43/debian/control 2012-03-13 18:43:18.000000000 +0000 +++ 0.43ubuntu2/debian/control 2012-06-22 08:09:03.000000000 +0000 @@ -1,9 +1,10 @@ Source: javatools Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Matthew Johnson <mjj29@debian.org>, Niels Thykier <niels@thykier.net> Build-Depends: debhelper (>= 7.0.50~) -Build-Depends-Indep: default-jdk, libarchive-zip-perl (>= 1.30-6~), markdown, perl +Build-Depends-Indep: default-jdk, libarchive-zip-perl (>= 1.30-6~), perl Standards-Version: 3.9.3 Section: java Vcs-Git: git://git.debian.org/git/pkg-java/javatools.git
  3. Download patch tutorial.html
  4. Download patch jh_installeclipse

    --- 0.43/jh_installeclipse 2011-03-24 20:17:34.000000000 +0000 +++ 0.43ubuntu2/jh_installeclipse 2012-10-02 20:05:39.000000000 +0000 @@ -178,12 +178,12 @@ sub find_dependency{ } close(DPKG); if(scalar(keys(%pkgtable)) > 0){ - my $cmd = "dpkg -l | grep -E ^ii"; + my $cmd = "dpkg -l | grep -E ^.i"; verbose_print($cmd); open(DPKG, "$cmd | ") or error("Could not run $cmd"); while( chomp(my $line = <DPKG>) ){ my ($pname, $version); - next if($line !~ m/^ii/o); + next if($line !~ m/^.i/o); (undef, $pname, $version, undef) = split(/\s++/o, $line); if(exists($pkgtable{$pname})){ $deppkg = $pname;

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jbossas4

jbossas4 (4.2.3.GA-7ubuntu1) quantal; urgency=low * Fix FTBFS by implementing jdbc and ejb3 resource annotation for Java7, and setting encoding on javac targets (LP: #888943): - debian/patches/jdbc-jdk7: added implementation of JDBC resource adapters for JDK7. - debian/patches/ejb3-jdk7: added lookup attribute to Resource annotation for JDK7. - debian/build.xml: set encoding on javac targets. -- Sebastian Carneiro <scarneiro@fibertel.com.ar> Fri, 21 Sep 2012 01:21:48 -0300

Modifications :
  1. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedResultSetJDK7.java
  2. Download patch ejb3/src/main/org/jboss/ejb/ResourceImpl.java

    --- 4.2.3.GA-7/ejb3/src/main/org/jboss/ejb/ResourceImpl.java 2008-07-18 15:00:50.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/ejb3/src/main/org/jboss/ejb/ResourceImpl.java 2012-10-05 11:06:51.000000000 +0000 @@ -36,6 +36,7 @@ public class ResourceImpl implements jav private Class type = Object.class; private String description; private String mappedName; + private String lookup; public ResourceImpl() { @@ -95,6 +96,16 @@ public class ResourceImpl implements jav this.shareable = shareable; } + public String lookup() + { + return lookup; + } + + public void setLookup(String lookup) + { + this.lookup = lookup; + } + public Class annotationType() { return javax.annotation.Resource.class;
  3. Download patch debian/control

    --- 4.2.3.GA-7/debian/control 2012-03-03 03:24:29.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/debian/control 2012-10-04 19:19:24.000000000 +0000 @@ -1,7 +1,8 @@ Source: jbossas4 Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Varun Hiremath <varun@debian.org>, Torsten Werner <twerner@debian.org> Build-Depends: cdbs, debhelper (>= 5) Build-Depends-Indep: ant, default-jdk, javacc, junit,
  4. Download patch debian/patches/jdk7-jdbc.diff
  5. Download patch .pc/applied-patches

    --- 4.2.3.GA-7/.pc/applied-patches 2012-10-05 11:06:49.888916576 +0000 +++ 4.2.3.GA-7ubuntu1/.pc/applied-patches 2012-10-05 11:06:51.580960094 +0000 @@ -9,3 +9,5 @@ catch_exception.diff deployers.diff hibernate35.diff hibernate36.diff +jdk7-jdbc.diff +ejb3-jdk7.diff
  6. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedPreparedStatementJDK7.java
  7. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedCallableStatementJDK7.java
  8. Download patch .pc/jdk7-jdbc.diff/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java
  9. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedConnectionFactoryJDK7.java

    --- 4.2.3.GA-7/connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedConnectionFactoryJDK7.java 1970-01-01 00:00:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedConnectionFactoryJDK7.java 2012-10-05 11:06:51.000000000 +0000 @@ -0,0 +1,56 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2006, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.resource.adapter.jdbc.jdk7; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.SQLException; + +import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection; +import org.jboss.resource.adapter.jdbc.CachedCallableStatement; +import org.jboss.resource.adapter.jdbc.CachedPreparedStatement; +import org.jboss.resource.adapter.jdbc.WrappedConnection; +import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory; + +/** + * WrappedConnectionFactoryJDK7 + * + * @author <a href="adrian@jboss.com">Adrian Brock</a> + * @version $Revision: 1.1 $ + */ +public class WrappedConnectionFactoryJDK7 implements WrappedConnectionFactory +{ + public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc) + { + return new WrappedConnectionJDK7(mc); + } + + public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException + { + return new CachedPreparedStatementJDK7(ps); + } + + public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException + { + return new CachedCallableStatementJDK7(cs); + } +}
  10. Download patch debian/patches/ejb3-jdk7.diff

    --- 4.2.3.GA-7/debian/patches/ejb3-jdk7.diff 1970-01-01 00:00:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/debian/patches/ejb3-jdk7.diff 2012-10-04 18:50:51.000000000 +0000 @@ -0,0 +1,36 @@ +From: Sebastián Carneiro <scarneiro@fibertel.com.ar> +Description: Adds lookup attribute to Resource annotation. +Bug-Ubuntu: https://launchpad.net/bugs/888943 +Forwarded: not-needed +Author: Sebastián Carneiro <scarneiro@fibertel.com.ar> +Last-Update: 2012-09-20 + +Index: fix-for-888943/ejb3/src/main/org/jboss/ejb/ResourceImpl.java +=================================================================== +--- fix-for-888943.orig/ejb3/src/main/org/jboss/ejb/ResourceImpl.java 2012-07-31 00:33:07.714445000 -0300 ++++ fix-for-888943/ejb3/src/main/org/jboss/ejb/ResourceImpl.java 2012-07-31 06:46:52.354537807 -0300 +@@ -36,6 +36,7 @@ + private Class type = Object.class; + private String description; + private String mappedName; ++ private String lookup; + + public ResourceImpl() + { +@@ -95,6 +96,16 @@ + this.shareable = shareable; + } + ++ public String lookup() ++ { ++ return lookup; ++ } ++ ++ public void setLookup(String lookup) ++ { ++ this.lookup = lookup; ++ } ++ + public Class annotationType() + { + return javax.annotation.Resource.class;
  11. Download patch .pc/jdk7-jdbc.diff/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java

    --- 4.2.3.GA-7/.pc/jdk7-jdbc.diff/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java 1970-01-01 00:00:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/.pc/jdk7-jdbc.diff/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java 2008-07-18 15:06:08.000000000 +0000 @@ -0,0 +1,168 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2006, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.resource.adapter.jdbc; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.sql.Connection; +import java.sql.SQLException; + +import javax.naming.Reference; +import javax.resource.Referenceable; +import javax.resource.ResourceException; +import javax.resource.spi.ConnectionManager; +import javax.resource.spi.ConnectionRequestInfo; +import javax.sql.DataSource; +import javax.transaction.RollbackException; + +import org.jboss.resource.connectionmanager.JTATransactionChecker; +import org.jboss.tm.TransactionTimeoutConfiguration; +import org.jboss.util.NestedSQLException; + +/** + * WrapperDataSource + * + * @author <a href="mailto:d_jencks@users.sourceforge.net">David Jencks</a> + * @author <a href="mailto:adrian@jboss.com">Adrian Brock</a> + * @version $Revision: 75426 $ + */ +public class WrapperDataSource extends JBossWrapper implements Referenceable, DataSource, Serializable +{ + static final long serialVersionUID = 3570285419164793501L; + + private final BaseWrapperManagedConnectionFactory mcf; + private final ConnectionManager cm; + + private Reference reference; + + protected WrapperDataSource (final BaseWrapperManagedConnectionFactory mcf, final ConnectionManager cm) + { + this.mcf = mcf; + this.cm = cm; + } + + public PrintWriter getLogWriter() throws SQLException + { + // TODO: implement this javax.sql.DataSource method + return null; + } + + public void setLogWriter(PrintWriter param1) throws SQLException + { + // TODO: implement this javax.sql.DataSource method + } + + public int getLoginTimeout() throws SQLException + { + // TODO: implement this javax.sql.DataSource method + return 0; + } + + public void setLoginTimeout(int param1) throws SQLException + { + // TODO: implement this javax.sql.DataSource method + } + + public Connection getConnection() throws SQLException + { + try + { + WrappedConnection wc = (WrappedConnection) cm.allocateConnection(mcf, null); + wc.setDataSource(this); + return wc; + } + catch (ResourceException re) + { + throw new NestedSQLException(re); + } + } + + public Connection getConnection(String user, String password) throws SQLException + { + ConnectionRequestInfo cri = new WrappedConnectionRequestInfo(user, password); + try + { + WrappedConnection wc = (WrappedConnection) cm.allocateConnection(mcf, cri); + wc.setDataSource(this); + return wc; + } + catch (ResourceException re) + { + throw new NestedSQLException(re); + } + } + + public void setReference(final Reference reference) + { + this.reference = reference; + } + + public Reference getReference() + { + return reference; + } + + protected int getTimeLeftBeforeTransactionTimeout() throws SQLException + { + try + { + if (cm instanceof TransactionTimeoutConfiguration) + { + long timeout = ((TransactionTimeoutConfiguration) cm).getTimeLeftBeforeTransactionTimeout(true); + // No timeout + if (timeout == -1) + return -1; + // Round up to the nearest second + long result = timeout / 1000; + if ((result % 1000) != 0) + ++result; + return (int) result; + } + else + return -1; + } + catch (RollbackException e) + { + throw new NestedSQLException(e); + } + } + + /** + * Check whether a tranasction is active + * + * @throws SQLException if the transaction is not active, preparing, prepared or committing or for any error in the transaction manager + */ + protected void checkTransactionActive() throws SQLException + { + if (cm == null) + throw new SQLException("No connection manager"); + try + { + if (cm instanceof JTATransactionChecker) + ((JTATransactionChecker) cm).checkTransactionActive(); + } + catch (Exception e) + { + throw new NestedSQLException(e); + } + } +}
  12. Download patch debian/patches/series

    --- 4.2.3.GA-7/debian/patches/series 2011-06-03 20:56:03.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/debian/patches/series 2012-10-04 18:50:51.000000000 +0000 @@ -9,3 +9,5 @@ catch_exception.diff deployers.diff hibernate35.diff hibernate36.diff +jdk7-jdbc.diff +ejb3-jdk7.diff
  13. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java

    --- 4.2.3.GA-7/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java 2008-07-18 15:06:08.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/connector/src/main/org/jboss/resource/adapter/jdbc/WrapperDataSource.java 2012-10-05 11:06:51.000000000 +0000 @@ -25,6 +25,9 @@ import java.io.PrintWriter; import java.io.Serializable; import java.sql.Connection; import java.sql.SQLException; +import java.sql.SQLFeatureNotSupportedException; + +import java.util.logging.Logger; import javax.naming.Reference; import javax.resource.Referenceable; @@ -165,4 +168,14 @@ public class WrapperDataSource extends J throw new NestedSQLException(e); } } + + /** + * Return the parent logger of all loggers used by this datasource + * + * @throws SQLFeatureNotSupportedException if this datasource does not use java.util.logging + */ + public Logger getParentLogger() throws SQLFeatureNotSupportedException + { + throw new SQLFeatureNotSupportedException("This datasource does not use logging"); + } }
  14. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java

    --- 4.2.3.GA-7/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java 2008-07-18 15:06:08.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/connector/src/main/org/jboss/resource/adapter/jdbc/BaseWrapperManagedConnection.java 2012-10-05 11:06:51.000000000 +0000 @@ -65,7 +65,7 @@ import org.jboss.resource.statistic.JBos public abstract class BaseWrapperManagedConnection implements ManagedConnection , JBossConnectionStatistics { private static final WrappedConnectionFactory wrappedConnectionFactory; - + protected final BaseWrapperManagedConnectionFactory mcf; protected final Connection con; @@ -101,23 +101,31 @@ public abstract class BaseWrapperManaged protected int jdbcTransactionIsolation; protected boolean destroyed = false; - + static { Class connectionFactory = null; + try { - connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionFactoryJDK6"); + connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk7.WrappedConnectionFactoryJDK7"); } - catch (ClassNotFoundException e) + catch (ClassNotFoundException e7) { try { - connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionFactoryJDK5"); + connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionFactoryJDK6"); } - catch (ClassNotFoundException ex) + catch (ClassNotFoundException e6) { - throw new RuntimeException("Unabled to load wrapped connection factory", ex); + try + { + connectionFactory = BaseWrapperManagedConnection.class.forName("org.jboss.resource.adapter.jdbc.jdk5.WrappedConnectionFactoryJDK5"); + } + catch (ClassNotFoundException e5) + { + throw new RuntimeException("Unabled to load wrapped connection factory", e5); + } } } try @@ -272,7 +280,7 @@ public abstract class BaseWrapperManaged throw new SQLException("Interrupted attempting lock: " + this); } } - + protected void unlock() { lock.unlock(); @@ -735,7 +743,7 @@ public abstract class BaseWrapperManaged connectionError(e); throw new JBossResourceException("SQLException", e); } - + public Object listConnectionStats() { if(psCache != null)
  15. Download patch .pc/ejb3-jdk7.diff/ejb3/src/main/org/jboss/ejb/ResourceImpl.java

    --- 4.2.3.GA-7/.pc/ejb3-jdk7.diff/ejb3/src/main/org/jboss/ejb/ResourceImpl.java 1970-01-01 00:00:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/.pc/ejb3-jdk7.diff/ejb3/src/main/org/jboss/ejb/ResourceImpl.java 2008-07-18 15:00:50.000000000 +0000 @@ -0,0 +1,102 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2006, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.ejb; + + +/** + * // * + * + * @author <a href="mailto:bill@jboss.org">William DeCoste</a> + * @version $Revision: 57207 $ + */ +public class ResourceImpl implements javax.annotation.Resource +{ + private boolean shareable; + private AuthenticationType authenticationType; + private String name; + private Class type = Object.class; + private String description; + private String mappedName; + + public ResourceImpl() + { + } + + public String mappedName() { return mappedName; } + + + + public String description() + { + return this.description; + } + + public void setDescription(String description) + { + this.description = description; + } + + public AuthenticationType authenticationType() + { + return authenticationType; + } + + public void setAuthenticationType(AuthenticationType authorizationType) + { + this.authenticationType = authorizationType; + } + + public Class type() + { + return type; + } + + public void setType(Class type) + { + this.type = type; + } + + public String name() + { + return name; + } + + public void setName(String name) + { + this.name = name; + } + + public boolean shareable() + { + return shareable; + } + + public void setShareable(boolean shareable) + { + this.shareable = shareable; + } + + public Class annotationType() + { + return javax.annotation.Resource.class; + } +}
  16. Download patch debian/build.xml

    --- 4.2.3.GA-7/debian/build.xml 2008-11-18 18:35:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/debian/build.xml 2012-10-04 18:50:51.000000000 +0000 @@ -57,7 +57,7 @@ <target name="jar"> <mkdir dir="${test.dir}/${class.dir}"/> <javac srcdir="${test.dir}/${source.dir}" destdir="${test.dir}/${class.dir}" - debug="true"/> + debug="true" encoding="ISO-8859-1" /> <jar jarfile="${test.jar}"> <fileset dir="${test.dir}/${class.dir}"> @@ -67,7 +67,7 @@ <mkdir dir="${ejb3x.dir}/${class.dir}"/> <javac srcdir="${ejb3x.dir}/${source.dir}" destdir="${ejb3x.dir}/${class.dir}" - debug="true" source="1.5"/> + debug="true" encoding="ISO-8859-1" source="1.5"/> <jar jarfile="${ejb3x.jar}"> <fileset dir="${ejb3x.dir}/${class.dir}"> @@ -77,7 +77,7 @@ <mkdir dir="${jmx.dir}/${class.dir}"/> <javac srcdir="${jmx.dir}/${source.dir}" destdir="${jmx.dir}/${class.dir}" - debug="true"/> + debug="true" encoding="ISO-8859-1" /> <!-- The upstream build.xml builds some more jars with partial content only. Do we need to build them? --> @@ -90,7 +90,7 @@ <mkdir dir="${system.dir}/${class.dir}"/> <javac srcdir="${system.dir}/${source.dir}" destdir="${system.dir}/${class.dir}" - debug="true" classpath="jboss-jmx.jar"/> + debug="true" encoding="ISO-8859-1" classpath="jboss-jmx.jar"/> <!-- The upstream build.xml builds some more jars with partial content only. Do we need to build them? --> @@ -102,7 +102,7 @@ <mkdir dir="${j2ee.dir}/${class.dir}"/> <javac srcdir="${j2ee.dir}/${source.dir}" destdir="${j2ee.dir}/${class.dir}" - debug="true" source="1.5"/> + debug="true" encoding="ISO-8859-1" source="1.5"/> <!-- The upstream build.xml builds some more jars with partial content only. Do we need to build them? Additionally it builds @@ -116,7 +116,7 @@ <mkdir dir="${jaxrpc.dir}/${class.dir}"/> <javac srcdir="${jaxrpc.dir}/${source.dir}" destdir="${jaxrpc.dir}/${class.dir}" - debug="true"/> + debug="true" encoding="ISO-8859-1" /> <jar jarfile="${jaxrpc.jar}"> <fileset dir="${jaxrpc.dir}/${class.dir}"> @@ -126,7 +126,7 @@ <mkdir dir="${naming.dir}/${class.dir}"/> <javac srcdir="${naming.dir}/${source.dir}" destdir="${naming.dir}/${class.dir}" - debug="true"/> + debug="true" encoding="ISO-8859-1" /> <jar jarfile="${jnpserver.jar}"> <fileset dir="${naming.dir}/${class.dir}"> @@ -147,7 +147,7 @@ <mkdir dir="${deployment.dir}/${class.dir}"/> <javac srcdir="${deployment.dir}/${source.dir}" destdir="${deployment.dir}/${class.dir}" - debug="true"> + debug="true" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -163,7 +163,7 @@ <mkdir dir="${transaction.dir}/${class.dir}"/> <javac srcdir="${transaction.dir}/${source.dir}" destdir="${transaction.dir}/${class.dir}" - debug="true"> + debug="true" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -182,7 +182,7 @@ target="security/src/main/org/jboss/security/auth/login/SunConfigParser.jj" javacchome="/usr/share/java/" static="false" debugparser="true"/> <javac srcdir="${security.dir}/${source.dir}" destdir="${security.dir}/${class.dir}" - debug="true" source="1.5"> + debug="true" encoding="ISO-8859-1" source="1.5"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -201,7 +201,7 @@ <mkdir dir="${server.dir}/${class.dir}"/> <javac srcdir="${server.dir}/${source.dir}" destdir="${server.dir}/${class.dir}" includes="**/invocation/**,**/Shutdown.java,**/logging/**,**/naming/NamingService*.java,**/jms/**,**/jmx/**,**/metadata/**,**/proxy/**,**/deployment/**" - debug="true" target="1.5" source="1.5"> + debug="true" target="1.5" source="1.5" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -220,7 +220,7 @@ target="messaging/src/main/org/jboss/mq/selectors/SelectorParser.jj" javacchome="/usr/share/java/" static="false" debugparser="true"/> <javac srcdir="${messaging.dir}/${source.dir}" destdir="${messaging.dir}/${class.dir}" - debug="true" source="1.5"> + debug="true" source="1.5" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -237,7 +237,7 @@ <mkdir dir="${management.dir}/${class.dir}"/> <javac srcdir="${management.dir}/${source.dir}" destdir="${management.dir}/${class.dir}" includes="org/jboss/management/j2ee/**" excludes="**/cluster/**,**/factory/EJB*.java,**/factory/RAR*.java" - debug="true"> + debug="true" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -254,7 +254,7 @@ <mkdir dir="${remoting.dir}/${class.dir}"/> <javac srcdir="${remoting.dir}/${source.dir}" destdir="${remoting.dir}/${class.dir}" - debug="true"> + debug="true" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -270,7 +270,7 @@ <mkdir dir="${jms.dir}/${class.dir}"/> <javac srcdir="${jms.dir}/${source.dir}" destdir="${jms.dir}/${class.dir}" - debug="true"> + debug="true" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -286,8 +286,8 @@ <mkdir dir="${connector.dir}/${class.dir}"/> <javac srcdir="${connector.dir}/${source.dir}" destdir="${connector.dir}/${class.dir}" - debug="true" source="1.5" includes="**/*.java" - excludes="**/org/jboss/resource/adapter/jdbc/jdk5/*.java"> + debug="true" source="1.5" encoding="ISO-8859-1" includes="**/*.java" + excludes="**/org/jboss/resource/adapter/jdbc/jdk5/*.java,**/org/jboss/resource/adapter/jdbc/jdk6/*.java"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -303,7 +303,7 @@ <mkdir dir="${cluster.dir}/${class.dir}"/> <javac srcdir="${cluster.dir}/${source.dir}" destdir="${cluster.dir}/${class.dir}" - includes="**/framework/**" debug="true" source="1.5"> + includes="**/framework/**" debug="true" source="1.5" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -320,7 +320,7 @@ <mkdir dir="${aspects.dir}/${class.dir}"/> <javac srcdir="${aspects.dir}/${source.dir}" destdir="${aspects.dir}/${class.dir}" - excludes="**/deployment/**" debug="true" source="1.4"> + excludes="**/deployment/**" debug="true" source="1.4" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -337,7 +337,7 @@ <mkdir dir="${ejb3.dir}/${class.dir}"/> <javac srcdir="${ejb3.dir}/${source.dir}" destdir="${ejb3.dir}/${class.dir}" excludes="**/deployers/**,**/embedded/**,**/iiop/**,**/naming/**,**/clientmodule/**,**/webservice/**" - debug="true" source="1.5"> + debug="true" source="1.5" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/> @@ -353,7 +353,7 @@ <mkdir dir="${webservices.dir}/${class.dir}"/> <javac srcdir="${webservices.dir}/${source.dir}" destdir="${webservices.dir}/${class.dir}" - debug="true" source="1.5"> + debug="true" source="1.5" encoding="ISO-8859-1"> <classpath> <fileset dir="."> <include name='*.jar'/>
  17. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedStatementJDK7.java

    --- 4.2.3.GA-7/connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedStatementJDK7.java 1970-01-01 00:00:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedStatementJDK7.java 2012-10-05 11:06:51.000000000 +0000 @@ -0,0 +1,152 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2006, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.resource.adapter.jdbc.jdk7; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; + +import org.jboss.resource.adapter.jdbc.WrappedResultSet; +import org.jboss.resource.adapter.jdbc.WrappedStatement; + +/** + * WrappedStatementJDK7. + * + * @author <a href="adrian@jboss.com">Adrian Brock</a> + * @version $Revision: 1.1 $ + */ +public class WrappedStatementJDK7 extends WrappedStatement +{ + public WrappedStatementJDK7(WrappedConnectionJDK7 lc, Statement s) + { + super(lc, s); + } + + protected WrappedResultSet wrapResultSet(ResultSet resultSet) + { + return new WrappedResultSetJDK7(this, resultSet); + } + + public boolean isClosed() throws SQLException + { + lock(); + try + { + Statement wrapped = getWrappedObject(); + if (wrapped == null) + return true; + return wrapped.isClosed(); + } + catch (Throwable t) + { + throw checkException(t); + } + finally + { + unlock(); + } + } + + public boolean isPoolable() throws SQLException + { + lock(); + try + { + Statement statement = getUnderlyingStatement(); + try + { + return statement.isPoolable(); + } + catch (Throwable t) + { + throw checkException(t); + } + } + finally + { + unlock(); + } + } + + public void setPoolable(boolean poolable) throws SQLException + { + lock(); + try + { + Statement statement = getUnderlyingStatement(); + try + { + statement.setPoolable(poolable); + } + catch (Throwable t) + { + throw checkException(t); + } + } + finally + { + unlock(); + } + } + + public boolean isCloseOnCompletion() throws SQLException + { + lock(); + try + { + Statement statement = getUnderlyingStatement(); + try + { + return statement.isCloseOnCompletion(); + } + catch (Throwable t) + { + throw checkException(t); + } + } + finally + { + unlock(); + } + } + + public void closeOnCompletion() throws SQLException + { + lock(); + try + { + Statement statement = getUnderlyingStatement(); + try + { + statement.closeOnCompletion(); + } + catch (Throwable t) + { + throw checkException(t); + } + } + finally + { + unlock(); + } + } +}
  18. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/CachedPreparedStatementJDK7.java

    --- 4.2.3.GA-7/connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/CachedPreparedStatementJDK7.java 1970-01-01 00:00:00.000000000 +0000 +++ 4.2.3.GA-7ubuntu1/connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/CachedPreparedStatementJDK7.java 2012-10-05 11:06:51.000000000 +0000 @@ -0,0 +1,161 @@ +/* + * JBoss, Home of Professional Open Source. + * Copyright 2006, Red Hat Middleware LLC, and individual contributors + * as indicated by the @author tags. See the copyright.txt file in the + * distribution for a full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jboss.resource.adapter.jdbc.jdk7; + +import java.io.InputStream; +import java.io.Reader; +import java.sql.NClob; +import java.sql.PreparedStatement; +import java.sql.RowId; +import java.sql.SQLException; +import java.sql.SQLXML; + +import org.jboss.resource.adapter.jdbc.CachedPreparedStatement; + +/** + * CachedPreparedStatementJDK5. + * + * @author <a href="adrian@jboss.com">Adrian Brock</a> + * @version $Revision: 1.1 $ + */ +public class CachedPreparedStatementJDK7 extends CachedPreparedStatement +{ + public CachedPreparedStatementJDK7(PreparedStatement ps) throws SQLException + { + super(ps); + } + + public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException + { + getWrappedObject().setAsciiStream(parameterIndex, x, length); + } + + public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException + { + getWrappedObject().setAsciiStream(parameterIndex, x); + } + + public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException + { + getWrappedObject().setBinaryStream(parameterIndex, x, length); + } + + public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException + { + getWrappedObject().setBinaryStream(parameterIndex, x); + } + + public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException + { + getWrappedObject().setBlob(parameterIndex, inputStream, length); + } + + public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException + { + getWrappedObject().setBlob(parameterIndex, inputStream); + } + + public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException + { + getWrappedObject().setCharacterStream(parameterIndex, reader, length); + } + + public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException + { + getWrappedObject().setCharacterStream(parameterIndex, reader); + } + + public void setClob(int parameterIndex, Reader reader, long length) throws SQLException + { + getWrappedObject().setClob(parameterIndex, reader, length); + } + + public void setClob(int parameterIndex, Reader reader) throws SQLException + { + getWrappedObject().setClob(parameterIndex, reader); + } + + public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException + { + getWrappedObject().setNCharacterStream(parameterIndex, value, length); + } + + public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException + { + getWrappedObject().setNCharacterStream(parameterIndex, value); + } + + public void setNClob(int parameterIndex, NClob value) throws SQLException + { + getWrappedObject().setNClob(parameterIndex, value); + } + + public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException + { + getWrappedObject().setNClob(parameterIndex, reader, length); + } + + public void setNClob(int parameterIndex, Reader reader) throws SQLException + { + getWrappedObject().setNClob(parameterIndex, reader); + } + + public void setNString(int parameterIndex, String value) throws SQLException + { + getWrappedObject().setNString(parameterIndex, value); + } + + public void setRowId(int parameterIndex, RowId x) throws SQLException + { + getWrappedObject().setRowId(parameterIndex, x); + } + + public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException + { + getWrappedObject().setSQLXML(parameterIndex, xmlObject); + } + + public boolean isClosed() throws SQLException + { + return getWrappedObject().isClosed(); + } + + public boolean isPoolable() throws SQLException + { + return getWrappedObject().isPoolable(); + } + + public void setPoolable(boolean poolable) throws SQLException + { + getWrappedObject().setPoolable(poolable); + } + + public boolean isCloseOnCompletion() throws SQLException + { + return getWrappedObject().isCloseOnCompletion(); + } + + public void closeOnCompletion() throws SQLException + { + getWrappedObject().closeOnCompletion(); + } +}
  19. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/CachedCallableStatementJDK7.java
  20. Download patch connector/src/main/org/jboss/resource/adapter/jdbc/jdk7/WrappedConnectionJDK7.java

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jetty

jetty (6.1.26-1ubuntu1) quantal; urgency=low * Re-sync from Debian unstable. * d/jetty.init: Look for JAVA_HOME in multiarch locations for openjdk-6 and openjdk-7 (LP: #878527). -- James Page <james.page@ubuntu.com> Tue, 29 May 2012 12:23:52 +0100

Modifications :
  1. Download patch debian/control

    --- 6.1.26-1/debian/control 2012-04-25 10:05:11.000000000 +0000 +++ 6.1.26-1ubuntu1/debian/control 2012-05-29 11:25:22.000000000 +0000 @@ -1,7 +1,8 @@ Source: jetty Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Thierry Carrez <thierry.carrez@ubuntu.com>, Ludovic Claude <ludovic.claude@laposte.net>, Torsten Werner <twerner@debian.org>, Niels Thykier <niels@thykier.net>, Pablo Duboue <pablo.duboue@gmail.com>
  2. Download patch debian/jetty.init

    --- 6.1.26-1/debian/jetty.init 2012-04-25 09:37:40.000000000 +0000 +++ 6.1.26-1ubuntu1/debian/jetty.init 2012-05-29 11:37:13.000000000 +0000 @@ -119,6 +119,8 @@ JAVA_OPTIONS="-Xmx256m -Djava.awt.headle # defined in /etc/default/jetty). Should contain a list of space separated directories. JDK_DIRS=" /usr/lib/jvm/default-java \ + /usr/lib/jvm/java-1.7.0-openjdk-* \ + /usr/lib/jvm/java-1.6.0-openjdk-* \ /usr/lib/jvm/java-6-sun \ /usr/lib/jvm/java-6-openjdk \ /usr/lib/jvm/java-1.5.0-sun \

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jffi

jffi (1.0.2-9ubuntu1) quantal; urgency=low * Merge from Debian Unstable (LP: #1011140). Remaining Changes: - Don't hard-code dependency on libffi runtime library. -- Vibhav Pant <vibhavp@gmail.com> Sun, 10 Jun 2012 17:01:37 +0530

Modifications :
  1. Download patch debian/rules

    --- 1.0.2-9/debian/rules 2012-05-31 04:49:42.000000000 +0000 +++ 1.0.2-9ubuntu1/debian/rules 2012-06-11 09:17:15.000000000 +0000 @@ -15,6 +15,10 @@ install/libjffi-java:: install/libjffi-jni:: install -D -m644 dist/jffi-*-*.jar \ debian/libjffi-jni/usr/lib/jffi/jffi-native.jar + cp ./build/jni/libjffi-1.0.so debian/libjffi-jni/usr/lib/ + +binary-predeb/libjffi-jni:: + rm -f debian/libjffi-jni/usr/lib/libjffi-1.0.so get-orig-source: uscan --download-version $(DEB_UPSTREAM_VERSION) --force-download --rename
  2. Download patch debian/control

    --- 1.0.2-9/debian/control 2012-05-31 04:49:42.000000000 +0000 +++ 1.0.2-9ubuntu1/debian/control 2012-06-11 09:17:15.000000000 +0000 @@ -1,7 +1,8 @@ Source: jffi Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Torsten Werner <twerner@debian.org> Build-Depends: debhelper (>= 7), cdbs, maven-repo-helper, libffi-dev, pkg-config, ant-optional, default-jdk, junit4 @@ -21,7 +22,7 @@ Description: Java Foreign Function Inter Package: libjffi-jni Architecture: any -Depends: ${misc:Depends}, libffi5 +Depends: ${misc:Depends}, ${shlibs:Depends} Recommends: libjffi-java Description: Java Foreign Function Interface (JNI library) JFFI is a wrapper for libffi, the foreign function interface library. A foreign

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jruby

jruby (1.5.6-4ubuntu1) quantal; urgency=low * Merge from debian unstable. Remaining changes: - Fix FTBFS with openjdk-7 as default-jdk (LP: #1009461) -- Julian Taylor <jtaylor@ubuntu.com> Fri, 05 Oct 2012 17:00:41 +0200

Modifications :
  1. Download patch src/org/jruby/RubyIO.java

    --- 1.5.6-5/src/org/jruby/RubyIO.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyIO.java 2013-01-08 01:36:12.000000000 +0000 @@ -861,8 +861,7 @@ public class RubyIO extends RubyObject { String className = klass.getName(); context.getRuntime().getWarnings().warn( ID.BLOCK_NOT_ACCEPTED, - className + "::new() does not take block; use " + className + "::open() instead", - className + "::open()"); + className + "::new() does not take block; use " + className + "::open() instead"); } return klass.newInstance(context, args, block);
  2. Download patch src/org/jruby/parser/ParserSupport.java

    --- 1.5.6-5/src/org/jruby/parser/ParserSupport.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/parser/ParserSupport.java 2013-01-08 01:36:12.000000000 +0000 @@ -631,7 +631,7 @@ public class ParserSupport { } private void handleUselessWarn(Node node, String useless) { - warnings.warn(ID.USELESS_EXPRESSION, node.getPosition(), "Useless use of " + useless + " in void context.", useless); + warnings.warn(ID.USELESS_EXPRESSION, node.getPosition(), "Useless use of " + useless + " in void context."); } /** @@ -1453,12 +1453,12 @@ public class ParserSupport { } public void warn(ID id, ISourcePosition position, String message, Object... data) { - warnings.warn(id, position, message, data); + warnings.warn(id, position, message); } public void warning(ID id, ISourcePosition position, String message, Object... data) { if (warnings.isVerbose()) { - warnings.warning(id, position, message, data); + warnings.warning(id, position, message); } }
  3. Download patch src/org/jruby/ast/DefnNode.java

    --- 1.5.6-5/src/org/jruby/ast/DefnNode.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/ast/DefnNode.java 2013-01-08 01:36:12.000000000 +0000 @@ -90,11 +90,11 @@ public class DefnNode extends MethodDefN String name = getName(); if (containingClass == runtime.getObject() && name == "initialize") { - runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining Object#initialize may cause infinite loop", "Object#initialize"); + runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining Object#initialize may cause infinite loop"); } if (name == "__id__" || name == "__send__") { - runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining `" + name + "' may cause serious problem", name); + runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining `" + name + "' may cause serious problem"); } Visibility visibility = context.getCurrentVisibility();
  4. Download patch src/org/jruby/RubyKernel.java

    --- 1.5.6-5/src/org/jruby/RubyKernel.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyKernel.java 2013-01-08 01:36:12.000000000 +0000 @@ -285,7 +285,7 @@ public class RubyKernel { @JRubyMethod(name = "getc", module = true, visibility = PRIVATE) public static IRubyObject getc(ThreadContext context, IRubyObject recv) { - context.getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "getc is obsolete; use STDIN.getc instead", "getc", "STDIN.getc"); + context.getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "getc is obsolete; use STDIN.getc instead"); IRubyObject defin = context.getRuntime().getGlobalVariables().get("$stdin"); return defin.callMethod(context, "getc"); }
  5. Download patch src/org/jruby/common/NullWarnings.java

    --- 1.5.6-5/src/org/jruby/common/NullWarnings.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/common/NullWarnings.java 2013-01-08 01:36:12.000000000 +0000 @@ -28,14 +28,15 @@ ***** END LICENSE BLOCK *****/ package org.jruby.common; +import org.jruby.Ruby; import org.jruby.lexer.yacc.ISourcePosition; /** * A Warnings implementation which silently ignores everything. */ public class NullWarnings implements IRubyWarnings { - private org.jruby.Ruby runtime; - public NullWarnings(org.jruby.Ruby runtime) { + private Ruby runtime; + public NullWarnings(Ruby runtime) { this.runtime = runtime; } @@ -47,10 +48,23 @@ public class NullWarnings implements IRu return runtime; } + public void warn(ID id, ISourcePosition position, String message) {} + public void warn(ID id, String fileName, int lineNumber, String message) {} + public void warn(ID id, String message) {} + public void warning(ID id, String message) {} + public void warning(ID id, ISourcePosition position, String message) {} + public void warning(ID id, String fileName, int lineNumber, String message) {} + + @Deprecated public void warn(ID id, String message, Object... data) {} + @Deprecated public void warning(ID id, String message, Object... data) {} + @Deprecated public void warn(ID id, ISourcePosition position, String message, Object... data) {} + @Deprecated public void warn(ID id, String fileName, int lineNumber, String message, Object... data) {} + @Deprecated public void warning(ID id, ISourcePosition position, String message, Object... data) {} + @Deprecated public void warning(ID id, String fileName, int lineNumber, String message, Object...data) {} }
  6. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyRational.java
  7. Download patch src/org/jruby/RubyEtc.java

    --- 1.5.6-5/src/org/jruby/RubyEtc.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyEtc.java 2013-01-08 01:36:12.000000000 +0000 @@ -117,7 +117,7 @@ public class RubyEtc { throw re; } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getpwuid is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getpwuid is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -138,7 +138,7 @@ public class RubyEtc { return setupPasswd(recv.getRuntime(), pwd); } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getpwnam is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getpwnam is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -169,7 +169,7 @@ public class RubyEtc { } } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.passwd is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.passwd is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -204,7 +204,7 @@ public class RubyEtc { runtime.getPosix().endpwent(); } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.endpwent is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.endpwent is not supported by JRuby on this platform"); } } return runtime.getNil(); @@ -217,7 +217,7 @@ public class RubyEtc { runtime.getPosix().setpwent(); } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.setpwent is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.setpwent is not supported by JRuby on this platform"); } } return runtime.getNil(); @@ -235,7 +235,7 @@ public class RubyEtc { } } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getpwent is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getpwent is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -256,7 +256,7 @@ public class RubyEtc { return setupGroup(runtime, grp); } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getgrnam is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getgrnam is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -281,7 +281,7 @@ public class RubyEtc { throw re; } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getgrgid is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getgrgid is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -294,7 +294,7 @@ public class RubyEtc { runtime.getPosix().endgrent(); } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.engrent is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.engrent is not supported by JRuby on this platform"); } } return runtime.getNil(); @@ -307,7 +307,7 @@ public class RubyEtc { runtime.getPosix().setgrent(); } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.setgrent is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.setgrent is not supported by JRuby on this platform"); } } return runtime.getNil(); @@ -338,7 +338,7 @@ public class RubyEtc { } } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.group is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.group is not supported by JRuby on this platform"); } return runtime.getNil(); } @@ -356,7 +356,7 @@ public class RubyEtc { } } catch (Exception e) { if (runtime.getDebug().isTrue()) { - runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getgrent is not supported by JRuby on this platform", e); + runtime.getWarnings().warn(ID.NOT_IMPLEMENTED, "Etc.getgrent is not supported by JRuby on this platform"); } return runtime.getNil(); }
  8. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyKernel.java
  9. Download patch src/org/jruby/RubyRational.java

    --- 1.5.6-5/src/org/jruby/RubyRational.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyRational.java 2013-01-08 01:36:12.000000000 +0000 @@ -879,7 +879,7 @@ public class RubyRational extends RubyNu long e = ne - de; if (e > 1023 || e < -1022) { - runtime.getWarnings().warn(IRubyWarnings.ID.FLOAT_OUT_OF_RANGE, "out of Float range", getMetaClass()); + runtime.getWarnings().warn(IRubyWarnings.ID.FLOAT_OUT_OF_RANGE, "out of Float range"); return runtime.newFloat(e > 0 ? Double.MAX_VALUE : 0); } @@ -890,7 +890,7 @@ public class RubyRational extends RubyNu f = ldexp(f, e); if (Double.isInfinite(f) || Double.isNaN(f)) { - runtime.getWarnings().warn(IRubyWarnings.ID.FLOAT_OUT_OF_RANGE, "out of Float range", getMetaClass()); + runtime.getWarnings().warn(IRubyWarnings.ID.FLOAT_OUT_OF_RANGE, "out of Float range"); } return runtime.newFloat(f);
  10. Download patch .pc/0009-java7-compat.patch/src/org/jruby/ast/DefnNode.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/ast/DefnNode.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/ast/DefnNode.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,133 @@ +/* + ***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2001-2002 Benoit Cerrina <b.cerrina@wanadoo.fr> + * Copyright (C) 2001-2002 Jan Arne Petersen <jpetersen@uni-bonn.de> + * Copyright (C) 2002 Anders Bengtsson <ndrsbngtssn@yahoo.se> + * Copyright (C) 2004 Thomas E Enebo <enebo@acm.org> + * Copyright (C) 2004 Stefan Matthias Aust <sma@3plus4.de> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.ast; + +import java.util.List; + +import org.jruby.MetaClass; +import org.jruby.Ruby; +import org.jruby.RubyModule; +import org.jruby.ast.types.INameNode; +import org.jruby.ast.visitor.NodeVisitor; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.internal.runtime.methods.DynamicMethod; +import org.jruby.internal.runtime.methods.DynamicMethodFactory; +import org.jruby.internal.runtime.methods.WrapperMethod; +import org.jruby.lexer.yacc.ISourcePosition; +import org.jruby.parser.StaticScope; +import org.jruby.runtime.Block; +import org.jruby.runtime.ThreadContext; +import org.jruby.runtime.Visibility; +import org.jruby.runtime.builtin.IRubyObject; + +/** + * method definition node. + */ +public class DefnNode extends MethodDefNode implements INameNode { + public DefnNode(ISourcePosition position, ArgumentNode nameNode, ArgsNode argsNode, + StaticScope scope, Node bodyNode) { + super(position, nameNode, argsNode, scope, bodyNode); + } + + public NodeType getNodeType() { + return NodeType.DEFNNODE; + } + + public Object accept(NodeVisitor iVisitor) { + return iVisitor.visitDefnNode(this); + } + + /** + * Get the name of this method + */ + @Override + public String getName() { + return nameNode.getName(); + } + + public List<Node> childNodes() { + return Node.createList(nameNode, argsNode, bodyNode); + } + + @Override + public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) { + RubyModule containingClass = context.getRubyClass(); + + if (containingClass == runtime.getDummy()) { + throw runtime.newTypeError("no class/module to add method"); + } + + String name = getName(); + + if (containingClass == runtime.getObject() && name == "initialize") { + runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining Object#initialize may cause infinite loop", "Object#initialize"); + } + + if (name == "__id__" || name == "__send__") { + runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining `" + name + "' may cause serious problem", name); + } + + Visibility visibility = context.getCurrentVisibility(); + if (name == "initialize" || name == "initialize_copy" || visibility == Visibility.MODULE_FUNCTION) { + visibility = Visibility.PRIVATE; + } + + scope.determineModule(); + + // Make a nil node if no body. Notice this is not part of AST. + Node body = bodyNode == null ? new NilNode(getPosition()) : bodyNode; + + DynamicMethod newMethod = DynamicMethodFactory.newDefaultMethod( + runtime, containingClass, name, scope, body, argsNode, + visibility, getPosition()); + + containingClass.addMethod(name, newMethod); + + if (context.getCurrentVisibility() == Visibility.MODULE_FUNCTION) { + containingClass.getSingletonClass().addMethod(name, + new WrapperMethod(containingClass.getSingletonClass(), newMethod, Visibility.PUBLIC)); + + containingClass.callMethod(context, "singleton_method_added", runtime.fastNewSymbol(name)); + } + + // 'class << state.self' and 'class << obj' uses defn as opposed to defs + if (containingClass.isSingleton()) { + ((MetaClass) containingClass).getAttached().callMethod(context, + "singleton_method_added", runtime.fastNewSymbol(name)); + } else { + containingClass.callMethod(context, "method_added", runtime.fastNewSymbol(name)); + } + + return runtime.getNil(); + } +}
  11. Download patch debian/patches/nailgun-0.9.0.patch

    --- 1.5.6-5/debian/patches/nailgun-0.9.0.patch 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/debian/patches/nailgun-0.9.0.patch 2013-01-07 23:49:17.000000000 +0000 @@ -0,0 +1,38 @@ +--- a/build.xml ++++ b/build.xml +@@ -328,7 +328,7 @@ + <zipfileset src="${build.lib.dir}/jffi.jar"/> + <zipfileset src="${build.lib.dir}/joda-time.jar"/> + <zipfileset src="${build.lib.dir}/yydebug.jar"/> +- <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> ++ <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> + <metainf dir="${base.dir}/spi"> + <include name="services/**"/> + </metainf> +@@ -389,7 +389,7 @@ + <zipfileset src="${build.lib.dir}/jffi.jar"/> + <zipfileset src="${build.lib.dir}/joda-time.jar"/> + <zipfileset src="${build.lib.dir}/yydebug.jar"/> +- <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> ++ <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> + <metainf dir="${base.dir}/spi"> + <include name="services/**"/> + </metainf> +@@ -467,7 +467,7 @@ + <zipfileset src="${build.lib.dir}/jffi.jar"/> + <zipfileset src="${build.lib.dir}/joda-time.jar"/> + <zipfileset src="${build.lib.dir}/yydebug.jar"/> +- <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> ++ <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> + <zipfileset src="${local.shared.lib.dir}/yecht.jar"/> + <metainf dir="${base.dir}/spi"> + <include name="services/**"/> +@@ -538,7 +538,7 @@ + <zipfileset src="${build.lib.dir}/jffi.jar"/> + <zipfileset src="${build.lib.dir}/joda-time.jar"/> + <zipfileset src="${build.lib.dir}/yydebug.jar"/> +- <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> ++ <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> + <zipfileset src="${local.shared.lib.dir}/yecht.jar"/> + <metainf dir="${base.dir}/spi"> + <include name="services/**"/>
  12. Download patch debian/control

    --- 1.5.6-5/debian/control 2012-12-11 20:23:08.000000000 +0000 +++ 1.5.6-5ubuntu1/debian/control 2012-12-12 03:09:20.000000000 +0000 @@ -1,7 +1,8 @@ Source: jruby Section: ruby Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Sebastien Delafond <seb@debian.org>, Torsten Werner <twerner@debian.org> Build-Depends: debhelper (>= 6.0.7~), default-jdk, ant-optional, @@ -18,7 +19,7 @@ Vcs-Browser: http://git.debian.org/?p=pk Package: jruby Architecture: all Replaces: jruby1.0, jruby1.1, jruby1.2 -Depends: openjdk-6-jre | java6-runtime, ${misc:Depends}, libjffi-jni +Depends: default-jre | java6-runtime, ${misc:Depends}, libjffi-jni Recommends: ri1.8 Description: 100% pure-Java implementation of Ruby JRuby is a 100% pure-Java implementation of the Ruby programming language.
  13. Download patch src/org/jruby/common/RubyWarnings.java

    --- 1.5.6-5/src/org/jruby/common/RubyWarnings.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/common/RubyWarnings.java 2013-01-08 01:36:12.000000000 +0000 @@ -48,21 +48,25 @@ public class RubyWarnings implements IRu warn(ID.MISCELLANEOUS, message); } - public org.jruby.Ruby getRuntime() { + public Ruby getRuntime() { return runtime; } + public boolean isVerbose() { + return runtime.isVerbose(); + } + /** * Prints a warning, unless $VERBOSE is nil. */ - public void warn(ID id, ISourcePosition position, String message, Object... data) { - warn(id, position.getFile(), position.getStartLine(), message, data); + public void warn(ID id, ISourcePosition position, String message) { + warn(id, position.getFile(), position.getStartLine(), message); } /** * Prints a warning, unless $VERBOSE is nil. */ - public void warn(ID id, String fileName, int lineNumber, String message, Object... data) { + public void warn(ID id, String fileName, int lineNumber, String message) { if (!runtime.warningsEnabled()) return; // TODO make an assert here StringBuilder buffer = new StringBuilder(100); @@ -73,38 +77,79 @@ public class RubyWarnings implements IRu errorStream.callMethod(runtime.getCurrentContext(), "write", runtime.newString(buffer.toString())); } - public boolean isVerbose() { - return runtime.isVerbose(); - } - - public void warn(ID id, String message, Object... data) { + public void warn(ID id, String message) { ThreadContext context = runtime.getCurrentContext(); - warn(id, context.getFile(), context.getLine(), message, data); + warn(id, context.getFile(), context.getLine(), message); } /** * Verbose mode warning methods, their contract is that consumer must explicitly check for runtime.isVerbose() * before calling them */ - public void warning(String message, Object... data) { - warning(ID.MISCELLANEOUS, message, data); + public void warning(String message) { + warning(ID.MISCELLANEOUS, message); } - public void warning(ID id, String message, Object... data) { + public void warning(ID id, String message) { ThreadContext context = runtime.getCurrentContext(); - warning(id, context.getFile(), context.getLine(), message, data); + warning(id, context.getFile(), context.getLine(), message); } /** * Prints a warning, only in verbose mode. */ - public void warning(ID id, ISourcePosition position, String message, Object... data) { - warning(id, position.getFile(), position.getStartLine(), message, data); + public void warning(ID id, ISourcePosition position, String message) { + warning(id, position.getFile(), position.getStartLine(), message); } /** * Prints a warning, only in verbose mode. */ + public void warning(ID id, String fileName, int lineNumber, String message) { + assert isVerbose(); + warn(id, fileName, lineNumber, message); + } + + @Deprecated + public void warn(ID id, ISourcePosition position, String message, Object... data) { + warn(id, position.getFile(), position.getStartLine(), message, data); + } + + @Deprecated + public void warn(ID id, String fileName, int lineNumber, String message, Object... data) { + if (!runtime.warningsEnabled()) return; // TODO make an assert here + + StringBuilder buffer = new StringBuilder(100); + + buffer.append(fileName).append(':').append(lineNumber + 1).append(' '); + buffer.append("warning: ").append(message).append('\n'); + IRubyObject errorStream = runtime.getGlobalVariables().get("$stderr"); + errorStream.callMethod(runtime.getCurrentContext(), "write", runtime.newString(buffer.toString())); + } + + @Deprecated + public void warn(ID id, String message, Object... data) { + ThreadContext context = runtime.getCurrentContext(); + warn(id, context.getFile(), context.getLine(), message, data); + } + + @Deprecated + public void warning(String message, Object... data) { + warning(ID.MISCELLANEOUS, message, data); + } + + @Deprecated + public void warning(ID id, String message, Object... data) { + ThreadContext context = runtime.getCurrentContext(); + warning(id, context.getFile(), context.getLine(), message, data); + } + + @Deprecated + public void warning(ID id, ISourcePosition position, String message, Object... data) { + warning(id, position.getFile(), position.getStartLine(), message, data); + } + + @Deprecated public void warning(ID id, String fileName, int lineNumber, String message, Object... data) { assert isVerbose(); warn(id, fileName, lineNumber, message, data);
  14. Download patch .pc/applied-patches

    --- 1.5.6-5/.pc/applied-patches 2013-01-08 01:36:11.701102760 +0000 +++ 1.5.6-5ubuntu1/.pc/applied-patches 2013-01-08 01:36:12.429120678 +0000 @@ -7,3 +7,5 @@ 0007-use-unversioned-jarjar.jar.patch 0008-CVE-2011-4838.patch 0009-CVE-2012-5370.patch +0009-java7-compat.patch +nailgun-0.9.0.patch
  15. Download patch src/org/jruby/RubyBignum.java

    --- 1.5.6-5/src/org/jruby/RubyBignum.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyBignum.java 2013-01-08 01:36:12.000000000 +0000 @@ -543,7 +543,7 @@ public class RubyBignum extends RubyInte long fixValue = fix.getLongValue(); // MRI issuses warning here on (RBIGNUM(x)->len * SIZEOF_BDIGITS * yy > 1024*1024) if (((value.bitLength() + 7) / 8) * 4 * Math.abs(fixValue) > 1024 * 1024) { - getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big", fixValue); + getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big"); } if (fixValue >= 0) { return bignorm(getRuntime(), value.pow((int) fixValue)); // num2int is also implemented @@ -552,7 +552,7 @@ public class RubyBignum extends RubyInte } } else if (other instanceof RubyBignum) { d = ((RubyBignum) other).getDoubleValue(); - getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big", d); + getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big"); } else if (other instanceof RubyFloat) { d = ((RubyFloat) other).getDoubleValue(); } else { @@ -579,7 +579,7 @@ public class RubyBignum extends RubyInte } // MRI issuses warning here on (RBIGNUM(x)->len * SIZEOF_BDIGITS * yy > 1024*1024) if (((value.bitLength() + 7) / 8) * 4 * Math.abs(fixValue) > 1024 * 1024) { - getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big", fixValue); + getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big"); } if (fixValue >= 0) { return bignorm(runtime, value.pow((int) fixValue)); // num2int is also implemented @@ -588,7 +588,7 @@ public class RubyBignum extends RubyInte } } else if (other instanceof RubyBignum) { d = ((RubyBignum) other).getDoubleValue(); - getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big", d); + getRuntime().getWarnings().warn(ID.MAY_BE_TOO_BIG, "in a**b, b may be too big"); } else if (other instanceof RubyFloat) { d = ((RubyFloat) other).getDoubleValue(); if (this.compareTo(RubyFixnum.zero(runtime)) == -1
  16. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyStruct.java
  17. Download patch src/org/jruby/ext/JRubyPOSIXHandler.java

    --- 1.5.6-5/src/org/jruby/ext/JRubyPOSIXHandler.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/ext/JRubyPOSIXHandler.java 2013-01-08 01:36:12.000000000 +0000 @@ -44,7 +44,7 @@ public class JRubyPOSIXHandler implement } else { ourID = ID.MISCELLANEOUS; } - runtime.getWarnings().warn(ourID, message, data); + runtime.getWarnings().warn(ourID, message); } public boolean isVerbose() {
  18. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyIO.java
  19. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyArray.java
  20. Download patch src/org/jruby/RubyModule.java

    --- 1.5.6-5/src/org/jruby/RubyModule.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyModule.java 2013-01-08 01:36:12.000000000 +0000 @@ -2693,7 +2693,7 @@ public class RubyModule extends RubyObje if (p == objectClass && this != objectClass) { String badCName = getName() + "::" + internedName; runtime.getWarnings().warn(ID.CONSTANT_BAD_REFERENCE, "toplevel constant " + - internedName + " referenced by " + badCName, badCName); + internedName + " referenced by " + badCName); } return value; @@ -2758,7 +2758,7 @@ public class RubyModule extends RubyObje runtime.getLoadService().removeAutoLoadFor(getName() + "::" + name); } else { if (warn) { - runtime.getWarnings().warn(ID.CONSTANT_ALREADY_INITIALIZED, "already initialized constant " + name, name); + runtime.getWarnings().warn(ID.CONSTANT_ALREADY_INITIALIZED, "already initialized constant " + name); } } }
  21. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyEtc.java
  22. Download patch src/org/jruby/Ruby.java

    --- 1.5.6-5/src/org/jruby/Ruby.java 2013-01-08 01:36:11.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/Ruby.java 2013-01-08 01:36:12.000000000 +0000 @@ -909,7 +909,7 @@ public final class Ruby { if (superClass == null) { String className = parentIsObject ? name : parent.getName() + "::" + name; - warnings.warn(ID.NO_SUPER_CLASS, "no super class for `" + className + "', Object assumed", className); + warnings.warn(ID.NO_SUPER_CLASS, "no super class for `" + className + "', Object assumed"); superClass = objectClass; }
  23. Download patch src/org/jruby/RubyObject.java

    --- 1.5.6-5/src/org/jruby/RubyObject.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyObject.java 2013-01-08 01:36:12.000000000 +0000 @@ -660,7 +660,7 @@ public class RubyObject extends RubyBasi */ @JRubyMethod(name = "id") public IRubyObject id_deprecated() { - getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "Object#id will be deprecated; use Object#object_id", "Object#id", "Object#object_id"); + getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "Object#id will be deprecated; use Object#object_id"); return id(); } @@ -717,7 +717,7 @@ public class RubyObject extends RubyBasi */ @JRubyMethod(name = "type") public RubyClass type_deprecated() { - getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "Object#type is deprecated; use Object#class", "Object#type", "Object#class"); + getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "Object#type is deprecated; use Object#class"); return type(); } @@ -1253,7 +1253,7 @@ public class RubyObject extends RubyBasi */ @JRubyMethod(name = "to_a", visibility = Visibility.PUBLIC, compat = CompatVersion.RUBY1_8) public RubyArray to_a() { - getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "default 'to_a' will be obsolete", "to_a"); + getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "default 'to_a' will be obsolete"); return getRuntime().newArray(this); }
  24. Download patch src/org/jruby/internal/runtime/GlobalVariables.java

    --- 1.5.6-5/src/org/jruby/internal/runtime/GlobalVariables.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/internal/runtime/GlobalVariables.java 2013-01-08 01:36:12.000000000 +0000 @@ -111,7 +111,7 @@ public class GlobalVariables { if (variable != null) return variable.getAccessor().getValue(); if (runtime.isVerbose()) { - runtime.getWarnings().warning(ID.GLOBAL_NOT_INITIALIZED, "global variable `" + name + "' not initialized", name); + runtime.getWarnings().warning(ID.GLOBAL_NOT_INITIALIZED, "global variable `" + name + "' not initialized"); } return runtime.getNil(); }
  25. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyBignum.java
  26. Download patch .pc/0009-java7-compat.patch/src/org/jruby/internal/runtime/UndefinedAccessor.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/internal/runtime/UndefinedAccessor.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/internal/runtime/UndefinedAccessor.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,76 @@ +/***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2002 Anders Bengtsson <ndrsbngtssn@yahoo.se> + * Copyright (C) 2002-2004 Jan Arne Petersen <jpetersen@uni-bonn.de> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.internal.runtime; + +import org.jruby.Ruby; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.runtime.IAccessor; +import org.jruby.runtime.builtin.IRubyObject; + +/** + * + * @author jpetersen + */ +public class UndefinedAccessor implements IAccessor { + private final Ruby runtime; + private final GlobalVariable globalVariable; + private final String name; + + /** + * Constructor for UndefinedAccessor. + */ + public UndefinedAccessor(Ruby runtime, GlobalVariable globalVariable, String name) { + assert runtime != null; + assert globalVariable != null; + assert name != null; + + this.runtime = runtime; + this.globalVariable = globalVariable; + this.name = name; + } + + /** + * @see org.jruby.runtime.IAccessor#getValue() + */ + public IRubyObject getValue() { + if (runtime.isVerbose()) { + runtime.getWarnings().warning(ID.ACCESSOR_NOT_INITIALIZED, "global variable `" + name + "' not initialized", name); + } + return runtime.getNil(); + } + + /** + * @see org.jruby.runtime.IAccessor#setValue(IRubyObject) + */ + public IRubyObject setValue(IRubyObject newValue) { + assert newValue != null; + globalVariable.setAccessor(new ValueAccessor(newValue)); + return newValue; + } +}
  27. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyModule.java
  28. Download patch src/org/jruby/RubyArray.java

    --- 1.5.6-5/src/org/jruby/RubyArray.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyArray.java 2013-01-08 01:36:12.000000000 +0000 @@ -2272,7 +2272,7 @@ public class RubyArray extends RubyObjec */ @JRubyMethod(name = {"indexes", "indices"}, required = 1, rest = true) public IRubyObject indexes(IRubyObject[] args) { - getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "Array#indexes is deprecated; use Array#values_at", "Array#indexes", "Array#values_at"); + getRuntime().getWarnings().warn(ID.DEPRECATED_METHOD, "Array#indexes is deprecated; use Array#values_at"); RubyArray ary = new RubyArray(getRuntime(), args.length);
  29. Download patch src/org/jruby/RubyStringScanner.java

    --- 1.5.6-5/src/org/jruby/RubyStringScanner.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyStringScanner.java 2013-01-08 01:36:12.000000000 +0000 @@ -131,7 +131,7 @@ public class RubyStringScanner extends R check(); Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { - runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#clear is obsolete; use #terminate instead", "StringScanner#clear", "#terminate"); + runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#clear is obsolete; use #terminate instead"); } return terminate(); } @@ -338,8 +338,7 @@ public class RubyStringScanner extends R Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { runtime.getWarnings().warning(ID.DEPRECATED_METHOD, - "StringScanner#getbyte is obsolete; use #get_byte instead", - "StringScanner#getbyte", "#get_byte"); + "StringScanner#getbyte is obsolete; use #get_byte instead"); } return get_byte(context); } @@ -365,8 +364,7 @@ public class RubyStringScanner extends R Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { runtime.getWarnings().warning( - ID.DEPRECATED_METHOD, "StringScanner#peep is obsolete; use #peek instead", - "StringScanner#peep", "#peek"); + ID.DEPRECATED_METHOD, "StringScanner#peep is obsolete; use #peek instead"); } return peek(context, length); } @@ -405,7 +403,7 @@ public class RubyStringScanner extends R public RubyBoolean empty_p(ThreadContext context) { Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { - runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#empty? is obsolete; use #eos? instead", "StringScanner#empty?", "#eos?"); + runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#empty? is obsolete; use #eos? instead"); } return eos_p(context); } @@ -440,8 +438,7 @@ public class RubyStringScanner extends R public IRubyObject matchedsize(ThreadContext context) { Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { - runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#matchedsize is obsolete; use #matched_size instead", - "StringScanner#matchedize", "#matched_size"); + runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#matchedsize is obsolete; use #matched_size instead"); } return matched_size(); } @@ -500,7 +497,7 @@ public class RubyStringScanner extends R public RubyFixnum restsize(ThreadContext context) { Ruby runtime = context.getRuntime(); if (runtime.isVerbose()) { - runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#restsize is obsolete; use #rest_size instead", "StringScanner#restsize", "#rest_size"); + runtime.getWarnings().warning(ID.DEPRECATED_METHOD, "StringScanner#restsize is obsolete; use #rest_size instead"); } return rest_size(); }
  30. Download patch src/org/jruby/RubyGC.java

    --- 1.5.6-5/src/org/jruby/RubyGC.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyGC.java 2013-01-08 01:36:12.000000000 +0000 @@ -105,6 +105,6 @@ public class RubyGC { private static void emptyImplementationWarning(Ruby runtime, String name) { runtime.getWarnings().warn(ID.EMPTY_IMPLEMENTATION, - name + " does nothing on JRuby", name); + name + " does nothing on JRuby"); } }
  31. Download patch debian/patches/series

    --- 1.5.6-5/debian/patches/series 2012-12-11 20:23:08.000000000 +0000 +++ 1.5.6-5ubuntu1/debian/patches/series 2013-01-07 23:48:42.000000000 +0000 @@ -7,3 +7,5 @@ 0007-use-unversioned-jarjar.jar.patch 0008-CVE-2011-4838.patch 0009-CVE-2012-5370.patch +0009-java7-compat.patch +nailgun-0.9.0.patch
  32. Download patch src/org/jruby/RubyGlobal.java

    --- 1.5.6-5/src/org/jruby/RubyGlobal.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyGlobal.java 2013-01-08 01:36:12.000000000 +0000 @@ -353,13 +353,13 @@ public class RubyGlobal { @Override public IRubyObject set(IRubyObject value) { - runtime.getWarnings().warn(ID.INEFFECTIVE_GLOBAL, "warning: variable " + name + " is no longer effective; ignored", name); + runtime.getWarnings().warn(ID.INEFFECTIVE_GLOBAL, "warning: variable " + name + " is no longer effective; ignored"); return value; } @Override public IRubyObject get() { - runtime.getWarnings().warn(ID.INEFFECTIVE_GLOBAL, "warning: variable " + name + " is no longer effective", name); + runtime.getWarnings().warn(ID.INEFFECTIVE_GLOBAL, "warning: variable " + name + " is no longer effective"); return runtime.getFalse(); } }
  33. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyObject.java
  34. Download patch .pc/0009-java7-compat.patch/src/org/jruby/lexer/yacc/RubyYaccLexer.java
  35. Download patch src/org/jruby/internal/runtime/UndefinedAccessor.java

    --- 1.5.6-5/src/org/jruby/internal/runtime/UndefinedAccessor.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/internal/runtime/UndefinedAccessor.java 2013-01-08 01:36:12.000000000 +0000 @@ -60,7 +60,7 @@ public class UndefinedAccessor implement */ public IRubyObject getValue() { if (runtime.isVerbose()) { - runtime.getWarnings().warning(ID.ACCESSOR_NOT_INITIALIZED, "global variable `" + name + "' not initialized", name); + runtime.getWarnings().warning(ID.ACCESSOR_NOT_INITIALIZED, "global variable `" + name + "' not initialized"); } return runtime.getNil(); }
  36. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyGC.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/RubyGC.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/RubyGC.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,110 @@ +/***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2002 Anders Bengtsson <ndrsbngtssn@yahoo.se> + * Copyright (C) 2002-2004 Jan Arne Petersen <jpetersen@uni-bonn.de> + * Copyright (C) 2004 Thomas E Enebo <enebo@acm.org> + * Copyright (C) 2004 Stefan Matthias Aust <sma@3plus4.de> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby; + +import org.jruby.anno.JRubyMethod; +import org.jruby.anno.JRubyModule; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.runtime.ThreadContext; +import org.jruby.runtime.Visibility; +import org.jruby.runtime.builtin.IRubyObject; + +/** + * GC (Garbage Collection) Module + * + * Note: Since we rely on Java's memory model we can't provide the + * kind of control over garbage collection that MRI provides. Also note + * that since all Ruby libraries make GC assumptions based on MRI's GC + * that we decided to no-op explicit collection through these APIs. + * You can use Java Integration in your libraries to force a Java + * GC (assuming you really want to). + * + */ +@JRubyModule(name="GC") +public class RubyGC { + private static volatile boolean gcDisabled = false; + private static volatile boolean stress = false; + + public static RubyModule createGCModule(Ruby runtime) { + RubyModule result = runtime.defineModule("GC"); + runtime.setGC(result); + + result.defineAnnotatedMethods(RubyGC.class); + + return result; + } + + @JRubyMethod(module = true, visibility = Visibility.PRIVATE) + public static IRubyObject start(ThreadContext context, IRubyObject recv) { + return context.getRuntime().getNil(); + } + + @JRubyMethod + public static IRubyObject garbage_collect(ThreadContext context, IRubyObject recv) { + return context.getRuntime().getNil(); + } + + @JRubyMethod(module = true, visibility = Visibility.PRIVATE) + public static IRubyObject enable(ThreadContext context, IRubyObject recv) { + Ruby runtime = context.getRuntime(); + emptyImplementationWarning(runtime, "GC.enable"); + boolean old = gcDisabled; + gcDisabled = false; + return runtime.newBoolean(old); + } + + @JRubyMethod(module = true, visibility = Visibility.PRIVATE) + public static IRubyObject disable(ThreadContext context, IRubyObject recv) { + Ruby runtime = context.getRuntime(); + emptyImplementationWarning(runtime, "GC.disable"); + boolean old = gcDisabled; + gcDisabled = true; + return runtime.newBoolean(old); + } + + @JRubyMethod(module = true, visibility = Visibility.PRIVATE) + public static IRubyObject stress(ThreadContext context, IRubyObject recv) { + return context.getRuntime().newBoolean(stress); + } + + @JRubyMethod(name = "stress=", module = true, visibility = Visibility.PRIVATE) + public static IRubyObject stress_set(ThreadContext context, IRubyObject recv, IRubyObject arg) { + Ruby runtime = context.getRuntime(); + emptyImplementationWarning(runtime, "GC.stress="); + stress = arg.isTrue(); + return runtime.newBoolean(stress); + } + + private static void emptyImplementationWarning(Ruby runtime, String name) { + runtime.getWarnings().warn(ID.EMPTY_IMPLEMENTATION, + name + " does nothing on JRuby", name); + } +}
  37. Download patch build.xml

    --- 1.5.6-5/build.xml 2013-01-08 01:36:11.000000000 +0000 +++ 1.5.6-5ubuntu1/build.xml 2013-01-08 01:36:12.000000000 +0000 @@ -328,7 +328,7 @@ <zipfileset src="${build.lib.dir}/jffi.jar"/> <zipfileset src="${build.lib.dir}/joda-time.jar"/> <zipfileset src="${build.lib.dir}/yydebug.jar"/> - <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> + <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> <metainf dir="${base.dir}/spi"> <include name="services/**"/> </metainf> @@ -389,7 +389,7 @@ <zipfileset src="${build.lib.dir}/jffi.jar"/> <zipfileset src="${build.lib.dir}/joda-time.jar"/> <zipfileset src="${build.lib.dir}/yydebug.jar"/> - <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> + <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> <metainf dir="${base.dir}/spi"> <include name="services/**"/> </metainf> @@ -467,7 +467,7 @@ <zipfileset src="${build.lib.dir}/jffi.jar"/> <zipfileset src="${build.lib.dir}/joda-time.jar"/> <zipfileset src="${build.lib.dir}/yydebug.jar"/> - <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> + <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> <zipfileset src="${local.shared.lib.dir}/yecht.jar"/> <metainf dir="${base.dir}/spi"> <include name="services/**"/> @@ -538,7 +538,7 @@ <zipfileset src="${build.lib.dir}/jffi.jar"/> <zipfileset src="${build.lib.dir}/joda-time.jar"/> <zipfileset src="${build.lib.dir}/yydebug.jar"/> - <zipfileset src="${build.lib.dir}/nailgun-0.7.1.jar"/> + <zipfileset src="${build.lib.dir}/nailgun-0.9.0.jar"/> <zipfileset src="${local.shared.lib.dir}/yecht.jar"/> <metainf dir="${base.dir}/spi"> <include name="services/**"/>
  38. Download patch .pc/0009-java7-compat.patch/src/org/jruby/Ruby.java
  39. Download patch .pc/0009-java7-compat.patch/src/org/jruby/ext/JRubyPOSIXHandler.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/ext/JRubyPOSIXHandler.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/ext/JRubyPOSIXHandler.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,87 @@ +package org.jruby.ext; + +import java.io.File; +import java.io.InputStream; +import java.io.PrintStream; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import org.jruby.Ruby; +import org.jruby.RubyHash; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.ext.posix.POSIXHandler; + +import com.kenai.constantine.platform.Errno; + +public class JRubyPOSIXHandler implements POSIXHandler { + private final Ruby runtime; + private final boolean isVerbose; + + public JRubyPOSIXHandler(Ruby runtime) { + this.runtime = runtime; + + boolean verbose = false; + try { + verbose = Boolean.getBoolean("jruby.native.verbose"); + } catch (SecurityException e) { + } + this.isVerbose = verbose; + } + + public void error(Errno error, String extraData) { + throw runtime.newErrnoFromInt(error.value(), extraData); + } + + public void unimplementedError(String method) { + throw runtime.newNotImplementedError(method + " unsupported on this platform"); + } + + public void warn(WARNING_ID id, String message, Object... data) { + ID ourID; + if (id == WARNING_ID.DUMMY_VALUE_USED) { + ourID = ID.DUMMY_VALUE_USED; + } else { + ourID = ID.MISCELLANEOUS; + } + runtime.getWarnings().warn(ourID, message, data); + } + + public boolean isVerbose() { + return isVerbose; + } + + public File getCurrentWorkingDirectory() { + return new File(runtime.getCurrentDirectory()); + } + + @SuppressWarnings("unchecked") + public String[] getEnv() { + RubyHash hash = (RubyHash) runtime.getObject().fastGetConstant("ENV"); + int i=0; + + String[] env = new String[hash.size()]; + for (Iterator<Entry<Object, Object>> iter = hash.directEntrySet().iterator(); iter.hasNext(); i++) { + Map.Entry<Object, Object> entry = iter.next(); + env[i] = entry.getKey().toString() + "=" + entry.getValue().toString(); + } + + return env; + } + + public PrintStream getErrorStream() { + return runtime.getErrorStream(); + } + + public InputStream getInputStream() { + return runtime.getInputStream(); + } + + public int getPID() { + return runtime.hashCode(); + } + + public PrintStream getOutputStream() { + return runtime.getOutputStream(); + } +}
  40. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyGlobal.java
  41. Download patch .pc/0009-java7-compat.patch/src/org/jruby/common/IRubyWarnings.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/common/IRubyWarnings.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/common/IRubyWarnings.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,111 @@ +/* + * **** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2002-2004 Anders Bengtsson <ndrsbngtssn@yahoo.se> + * Copyright (C) 2002-2004 Jan Arne Petersen <jpetersen@uni-bonn.de> + * Copyright (C) 2004 Thomas E Enebo <enebo@acm.org> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.common; + +import org.jruby.lexer.yacc.ISourcePosition; + +// FIXME: Document difference between warn and warning (or rename one better) +/** + */ +public interface IRubyWarnings { + public enum ID { + AMBIGUOUS_ARGUMENT("AMBIGUOUS_ARGUMENT"), + ACCESSOR_NOT_INITIALIZED("ACCESSOR_NOT_INITIALIZED"), + ARGUMENT_AS_PREFIX("ARGUMENT_AS_PREFIX"), + ARGUMENT_EXTRA_SPACE("ARGUMENT_EXTRA_SPACE"), + ASSIGNMENT_IN_CONDITIONAL("ASSIGNMENT_IN_CONDITIONAL"), + BIGNUM_FROM_FLOAT_RANGE("BIGNUM_FROM_FLOAT_RANGE"), + BLOCK_BEATS_DEFAULT_VALUE("BLOCK_BEATS_DEFAULT_VALUE"), + BLOCK_NOT_ACCEPTED("BLOCK_NOT_ACCEPTED"), + BLOCK_UNUSED("BLOCK_UNUSED"), + CONSTANT_ALREADY_INITIALIZED("CONSTANT_ALREADY_INITIALIZED"), + CONSTANT_BAD_REFERENCE("CONSTANT_BAD_REFERENCE"), + CVAR_FROM_TOPLEVEL_SINGLETON_METHOD("CVAR_FROM_TOPLEVEL_SINGLETON_METHOD"), + DECLARING_SCLASS_VARIABLE("DECLARING_SCLASS_VARIABLE"), + DEPRECATED_METHOD("DEPRECATED_METHOD"), + DUMMY_VALUE_USED("DUMMY_VALUE_USED"), + END_IN_METHOD("END_IN_METHOD"), + ELSE_WITHOUT_RESCUE("ELSE_WITHOUT_RESCUE"), + EMPTY_IMPLEMENTATION("EMPTY_IMPLEMENTATION"), + ENV_VARS_FROM_CLI_METHOD("ENV_VARS_FROM_CLI_METHOD"), + FIXNUMS_NOT_SYMBOLS("FIXNUMS_NOT_SYMBOLS"), + FLOAT_OUT_OF_RANGE("FLOAT_OUT_OF_RANGE"), + GLOBAL_NOT_INITIALIZED("GLOBAL_NOT_INITIALIZED"), + GROUPED_EXPRESSION("GROUPED_EXPRESSION"), + INEFFECTIVE_GLOBAL("INNEFFECTIVE_GLOBAL"), + INVALID_CHAR_SEQUENCE("INVALID_CHAR_SEQUENCE"), + IVAR_NOT_INITIALIZED("IVAR_NOT_INITIALIZED"), + MAY_BE_TOO_BIG("MAY_BE_TOO_BIG"), + MISCELLANEOUS("MISCELLANEOUS"), + MULTIPLE_VALUES_FOR_BLOCK("MULTIPLE_VALUES_FOR_BLOCK"), + NEGATIVE_NUMBER_FOR_U("NEGATIVE_NUMBER_FOR_U"), + NO_SUPER_CLASS("NO_SUPER_CLASS"), + NOT_IMPLEMENTED("NOT_IMPLEMENTED"), + OBSOLETE_ARGUMENT("OBSOLETE_ARGUMENT"), + PARENTHISE_ARGUMENTS("PARENTHISE_ARGUMENTS"), + PROXY_EXTENDED_LATE("PROXY_EXTENDED_LATE"), + STATEMENT_NOT_REACHED("STATEMENT_NOT_REACHED"), + LITERAL_IN_CONDITIONAL_RANGE("LITERAL_IN_CONDITIONAL_RANGE"), + REDEFINING_DANGEROUS("REDEFINING_DANGEROUS"), + REGEXP_IGNORED_FLAGS("REGEXP_IGNORED_FLAGS"), + REGEXP_LITERAL_IN_CONDITION("REGEXP_LITERAL_IN_CONDITION"), + REGEXP_MATCH_AGAINST_STRING("REGEXP_MATCH_AGAINST_STRING"), + SAFE_NOT_SUPPORTED("SAFE_NOT_SUPPORTED"), + STRUCT_CONSTANT_REDEFINED("STRUCT_CONSTANT_REDEFINED"), + SYMBOL_AS_INTEGER("SYMBOL_AS_INTEGER"), + SYSSEEK_BUFFERED_IO("SYSSEEK_BUFFERED_IO"), + SYSWRITE_BUFFERED_IO("SYSWRITE_BUFFERED_IO"), + SWALLOWED_IO_EXCEPTION("SWALLOWED_IO_EXCEPTION"), + TOO_MANY_ARGUMENTS("TOO_MANY_ARGUMENTS"), + UNDEFINING_BAD("UNDEFINING_BAD"), + USELESS_EXPRESSION("USELESS_EXPRESSION"), + VOID_VALUE_EXPRESSION("VOID_VALUE_EXPRESSION"); + + private final String id; + + ID(String id) { + this.id = id; + } + + public String getID() { + return id; + } + } + + public abstract org.jruby.Ruby getRuntime(); + public abstract void warn(ID id, ISourcePosition position, String message, Object... data); + public abstract void warn(ID id, String fileName, int lineNumber, String message, Object... data); + public abstract boolean isVerbose(); + public abstract void warn(ID id, String message, Object... data); + public abstract void warning(ID id, String message, Object... data); + public abstract void warning(ID id, ISourcePosition position, String message, Object... data); + public abstract void warning(ID id, String fileName, int lineNumber, String message, Object... data); +}
  42. Download patch src/org/jruby/lexer/yacc/RubyYaccLexer.java

    --- 1.5.6-5/src/org/jruby/lexer/yacc/RubyYaccLexer.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/lexer/yacc/RubyYaccLexer.java 2013-01-08 01:36:12.000000000 +0000 @@ -116,7 +116,7 @@ public class RubyYaccLexer { try { d = Double.parseDouble(number); } catch (NumberFormatException e) { - warnings.warn(ID.FLOAT_OUT_OF_RANGE, getPosition(), "Float " + number + " out of range.", number); + warnings.warn(ID.FLOAT_OUT_OF_RANGE, getPosition(), "Float " + number + " out of range."); d = number.startsWith("-") ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY; } @@ -1090,7 +1090,7 @@ public class RubyYaccLexer { //a wrong position if the "inclusive" flag is not set. ISourcePosition tmpPosition = getPosition(); if (isARG() && spaceSeen && !Character.isWhitespace(c)) { - if (warnings.isVerbose()) warnings.warning(ID.ARGUMENT_AS_PREFIX, tmpPosition, "`&' interpreted as argument prefix", "&"); + if (warnings.isVerbose()) warnings.warning(ID.ARGUMENT_AS_PREFIX, tmpPosition, "`&' interpreted as argument prefix"); c = Tokens.tAMPER; } else if (isBEG()) { c = Tokens.tAMPER; @@ -1939,7 +1939,7 @@ public class RubyYaccLexer { default: src.unread(c); if (isARG() && spaceSeen && !Character.isWhitespace(c)) { - if (warnings.isVerbose()) warnings.warning(ID.ARGUMENT_AS_PREFIX, getPosition(), "`*' interpreted as argument prefix", "*"); + if (warnings.isVerbose()) warnings.warning(ID.ARGUMENT_AS_PREFIX, getPosition(), "`*' interpreted as argument prefix"); c = Tokens.tSTAR; } else if (isBEG()) { c = Tokens.tSTAR;
  43. Download patch .pc/0009-java7-compat.patch/src/org/jruby/javasupport/util/RuntimeHelpers.java
  44. Download patch .pc/0009-java7-compat.patch/src/org/jruby/common/NullWarnings.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/common/NullWarnings.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/common/NullWarnings.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,56 @@ +/* + ***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2004 Jan Arne Petersen <jpetersen@uni-bonn.de> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.common; + +import org.jruby.lexer.yacc.ISourcePosition; + +/** + * A Warnings implementation which silently ignores everything. + */ +public class NullWarnings implements IRubyWarnings { + private org.jruby.Ruby runtime; + public NullWarnings(org.jruby.Ruby runtime) { + this.runtime = runtime; + } + + public boolean isVerbose() { + return false; + } + + public org.jruby.Ruby getRuntime() { + return runtime; + } + + public void warn(ID id, String message, Object... data) {} + public void warning(ID id, String message, Object... data) {} + public void warn(ID id, ISourcePosition position, String message, Object... data) {} + public void warn(ID id, String fileName, int lineNumber, String message, Object... data) {} + public void warning(ID id, ISourcePosition position, String message, Object... data) {} + public void warning(ID id, String fileName, int lineNumber, String message, Object...data) {} +}
  45. Download patch .pc/0009-java7-compat.patch/src/org/jruby/parser/ParserSupport.java
  46. Download patch debian/patches/0009-java7-compat.patch
  47. Download patch src/org/jruby/common/IRubyWarnings.java

    --- 1.5.6-5/src/org/jruby/common/IRubyWarnings.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/common/IRubyWarnings.java 2013-01-08 01:36:12.000000000 +0000 @@ -30,6 +30,7 @@ ***** END LICENSE BLOCK *****/ package org.jruby.common; +import org.jruby.Ruby; import org.jruby.lexer.yacc.ISourcePosition; // FIXME: Document difference between warn and warning (or rename one better) @@ -100,12 +101,26 @@ public interface IRubyWarnings { } } - public abstract org.jruby.Ruby getRuntime(); - public abstract void warn(ID id, ISourcePosition position, String message, Object... data); - public abstract void warn(ID id, String fileName, int lineNumber, String message, Object... data); + public abstract Ruby getRuntime(); public abstract boolean isVerbose(); + + public abstract void warn(ID id, ISourcePosition position, String message); + public abstract void warn(ID id, String fileName, int lineNumber, String message); + public abstract void warn(ID id, String message); + public abstract void warning(ID id, String message); + public abstract void warning(ID id, ISourcePosition position, String message); + public abstract void warning(ID id, String fileName, int lineNumber, String message); + + @Deprecated public abstract void warn(ID id, String message, Object... data); + @Deprecated public abstract void warning(ID id, String message, Object... data); + @Deprecated + public abstract void warn(ID id, ISourcePosition position, String message, Object... data); + @Deprecated + public abstract void warn(ID id, String fileName, int lineNumber, String message, Object... data); + @Deprecated public abstract void warning(ID id, ISourcePosition position, String message, Object... data); - public abstract void warning(ID id, String fileName, int lineNumber, String message, Object... data); + @Deprecated + public abstract void warning(ID id, String fileName, int lineNumber, String message, Object...data); }
  48. Download patch .pc/0009-java7-compat.patch/src/org/jruby/ast/InstVarNode.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/ast/InstVarNode.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/ast/InstVarNode.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,124 @@ +/* + ***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2002 Anders Bengtsson <ndrsbngtssn@yahoo.se> + * Copyright (C) 2002 Jan Arne Petersen <jpetersen@uni-bonn.de> + * Copyright (C) 2002 Benoit Cerrina <b.cerrina@wanadoo.fr> + * Copyright (C) 2004 Thomas E Enebo <enebo@acm.org> + * Copyright (C) 2006 Lukas Felber <lfelber@hsr.ch> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.ast; + +import java.util.List; + +import org.jruby.Ruby; +import org.jruby.RubyClass; +import org.jruby.RubyClass.VariableAccessor; +import org.jruby.ast.types.IArityNode; +import org.jruby.ast.types.INameNode; +import org.jruby.ast.visitor.NodeVisitor; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.lexer.yacc.ISourcePosition; +import org.jruby.runtime.Arity; +import org.jruby.runtime.Block; +import org.jruby.runtime.ThreadContext; +import org.jruby.runtime.builtin.IRubyObject; + +/** + * Represents an instance variable accessor. + */ +public class InstVarNode extends Node implements IArityNode, INameNode { + private String name; + private VariableAccessor accessor = VariableAccessor.DUMMY_ACCESSOR; + + public InstVarNode(ISourcePosition position, String name) { + super(position); + this.name = name; + } + + public NodeType getNodeType() { + return NodeType.INSTVARNODE; + } + + /** + * Accept for the visitor pattern. + * @param iVisitor the visitor + **/ + public Object accept(NodeVisitor iVisitor) { + return iVisitor.visitInstVarNode(this); + } + + /** + * A variable accessor takes no arguments. + */ + public Arity getArity() { + return Arity.noArguments(); + } + + /** + * Gets the name. + * @return Returns a String + */ + public String getName() { + return name; + } + + public List<Node> childNodes() { + return EMPTY_LIST; + } + + public void setName(String name){ + this.name = name; + } + + @Override + public IRubyObject interpret(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) { + RubyClass cls = self.getMetaClass().getRealClass(); + VariableAccessor localAccessor = accessor; + IRubyObject value; + if (localAccessor.getClassId() != cls.hashCode()) { + localAccessor = cls.getVariableAccessorForRead(name); + if (localAccessor == null) return runtime.getNil(); + value = (IRubyObject)localAccessor.get(self); + accessor = localAccessor; + } else { + value = (IRubyObject)localAccessor.get(self); + } + if (value != null) return value; + if (runtime.isVerbose()) warnAboutUninitializedIvar(runtime); + return runtime.getNil(); + } + + private void warnAboutUninitializedIvar(Ruby runtime) { + runtime.getWarnings().warning(ID.IVAR_NOT_INITIALIZED, getPosition(), + "instance variable " + name + " not initialized", name); + } + + @Override + public String definition(Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock) { + return self.getInstanceVariables().fastHasInstanceVariable(name) ? "instance-variable" : null; + } +}
  49. Download patch .pc/0009-java7-compat.patch/src/org/jruby/RubyStringScanner.java
  50. Download patch .pc/0009-java7-compat.patch/src/org/jruby/common/RubyWarnings.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/common/RubyWarnings.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/common/RubyWarnings.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,112 @@ +/***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2004 Jan Arne Petersen <jpetersen@uni-bonn.de> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.common; + +import org.joni.WarnCallback; +import org.jruby.Ruby; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.lexer.yacc.ISourcePosition; +import org.jruby.runtime.ThreadContext; +import org.jruby.runtime.builtin.IRubyObject; + +/** + * + */ +public class RubyWarnings implements IRubyWarnings, WarnCallback { + private final Ruby runtime; + + public RubyWarnings(Ruby runtime) { + this.runtime = runtime; + } + + public void warn(String message) { + warn(ID.MISCELLANEOUS, message); + } + + public org.jruby.Ruby getRuntime() { + return runtime; + } + + /** + * Prints a warning, unless $VERBOSE is nil. + */ + public void warn(ID id, ISourcePosition position, String message, Object... data) { + warn(id, position.getFile(), position.getStartLine(), message, data); + } + + /** + * Prints a warning, unless $VERBOSE is nil. + */ + public void warn(ID id, String fileName, int lineNumber, String message, Object... data) { + if (!runtime.warningsEnabled()) return; // TODO make an assert here + + StringBuilder buffer = new StringBuilder(100); + + buffer.append(fileName).append(':').append(lineNumber + 1).append(' '); + buffer.append("warning: ").append(message).append('\n'); + IRubyObject errorStream = runtime.getGlobalVariables().get("$stderr"); + errorStream.callMethod(runtime.getCurrentContext(), "write", runtime.newString(buffer.toString())); + } + + public boolean isVerbose() { + return runtime.isVerbose(); + } + + public void warn(ID id, String message, Object... data) { + ThreadContext context = runtime.getCurrentContext(); + warn(id, context.getFile(), context.getLine(), message, data); + } + + /** + * Verbose mode warning methods, their contract is that consumer must explicitly check for runtime.isVerbose() + * before calling them + */ + public void warning(String message, Object... data) { + warning(ID.MISCELLANEOUS, message, data); + } + + public void warning(ID id, String message, Object... data) { + ThreadContext context = runtime.getCurrentContext(); + warning(id, context.getFile(), context.getLine(), message, data); + } + + /** + * Prints a warning, only in verbose mode. + */ + public void warning(ID id, ISourcePosition position, String message, Object... data) { + warning(id, position.getFile(), position.getStartLine(), message, data); + } + + /** + * Prints a warning, only in verbose mode. + */ + public void warning(ID id, String fileName, int lineNumber, String message, Object... data) { + assert isVerbose(); + warn(id, fileName, lineNumber, message, data); + } +}
  51. Download patch src/org/jruby/javasupport/util/RuntimeHelpers.java

    --- 1.5.6-5/src/org/jruby/javasupport/util/RuntimeHelpers.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/javasupport/util/RuntimeHelpers.java 2013-01-08 01:36:12.000000000 +0000 @@ -1579,11 +1579,11 @@ public class RuntimeHelpers { } if (containingClass == runtime.getObject() && name.equals("initialize")) { - runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining Object#initialize may cause infinite loop", "Object#initialize"); + runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining Object#initialize may cause infinite loop"); } if (name.equals("__id__") || name.equals("__send__")) { - runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining `" + name + "' may cause serious problem", name); + runtime.getWarnings().warn(ID.REDEFINING_DANGEROUS, "redefining `" + name + "' may cause serious problem"); } }
  52. Download patch src/org/jruby/ast/InstVarNode.java

    --- 1.5.6-5/src/org/jruby/ast/InstVarNode.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/ast/InstVarNode.java 2013-01-08 01:36:12.000000000 +0000 @@ -114,7 +114,7 @@ public class InstVarNode extends Node im private void warnAboutUninitializedIvar(Ruby runtime) { runtime.getWarnings().warning(ID.IVAR_NOT_INITIALIZED, getPosition(), - "instance variable " + name + " not initialized", name); + "instance variable " + name + " not initialized"); } @Override
  53. Download patch src/org/jruby/RubyStruct.java

    --- 1.5.6-5/src/org/jruby/RubyStruct.java 2011-09-20 18:02:18.000000000 +0000 +++ 1.5.6-5ubuntu1/src/org/jruby/RubyStruct.java 2013-01-08 01:36:12.000000000 +0000 @@ -211,7 +211,7 @@ public class RubyStruct extends RubyObje if (type != null) { ThreadContext context = runtime.getCurrentContext(); Frame frame = context.getCurrentFrame(); - runtime.getWarnings().warn(ID.STRUCT_CONSTANT_REDEFINED, frame.getFile(), frame.getLine(), "redefining constant Struct::" + name, name); + runtime.getWarnings().warn(ID.STRUCT_CONSTANT_REDEFINED, frame.getFile(), frame.getLine(), "redefining constant Struct::" + name); superClass.remove_const(context, runtime.newString(name)); } newStruct = superClass.defineClassUnder(name, superClass, STRUCT_INSTANCE_ALLOCATOR);
  54. Download patch .pc/nailgun-0.9.0.patch/build.xml
  55. Download patch .pc/0009-java7-compat.patch/src/org/jruby/internal/runtime/GlobalVariables.java

    --- 1.5.6-5/.pc/0009-java7-compat.patch/src/org/jruby/internal/runtime/GlobalVariables.java 1970-01-01 00:00:00.000000000 +0000 +++ 1.5.6-5ubuntu1/.pc/0009-java7-compat.patch/src/org/jruby/internal/runtime/GlobalVariables.java 2011-09-20 18:02:18.000000000 +0000 @@ -0,0 +1,188 @@ +/***** BEGIN LICENSE BLOCK ***** + * Version: CPL 1.0/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Common Public + * License Version 1.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.eclipse.org/legal/cpl-v10.html + * + * 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. + * + * Copyright (C) 2002-2004 Anders Bengtsson <ndrsbngtssn@yahoo.se> + * Copyright (C) 2002-2004 Jan Arne Petersen <jpetersen@uni-bonn.de> + * Copyright (C) 2004 Thomas E Enebo <enebo@acm.org> + * Copyright (C) 2004 Stefan Matthias Aust <sma@3plus4.de> + * Copyright (C) 2005 Charles O Nutter <headius@headius.com> + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the CPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the CPL, the GPL or the LGPL. + ***** END LICENSE BLOCK *****/ +package org.jruby.internal.runtime; + +import java.util.concurrent.ConcurrentHashMap; +import java.util.Map; +import java.util.Set; + +import org.jruby.Ruby; +import org.jruby.RubyProc; +import org.jruby.common.IRubyWarnings.ID; +import org.jruby.exceptions.RaiseException; +import org.jruby.runtime.IAccessor; +import org.jruby.runtime.builtin.IRubyObject; + +/** + * + * @author jpetersen + */ +public class GlobalVariables { + private Ruby runtime; + private Map<String, GlobalVariable> globalVariables = new ConcurrentHashMap<String, GlobalVariable>(); + + public GlobalVariables(Ruby runtime) { + this.runtime = runtime; + } + + public void define(String name, IAccessor accessor) { + assert name != null; + assert accessor != null; + assert name.startsWith("$"); + + globalVariables.put(name, new GlobalVariable(accessor)); + } + + public void defineReadonly(String name, IAccessor accessor) { + assert name != null; + assert accessor != null; + assert name.startsWith("$"); + + globalVariables.put(name, new GlobalVariable(new ReadonlyAccessor(name, accessor))); + } + + public boolean isDefined(String name) { + assert name != null; + assert name.startsWith("$"); + + GlobalVariable variable = (GlobalVariable)globalVariables.get(name); + return variable != null && !(variable.getAccessor() instanceof UndefinedAccessor); + } + + /** Creates a new global variable which links to + * the oldName global variable. + * + * <b>WANRING</b> we are already using the 1.7.1 behaviour. + */ + public void alias(String name, String oldName) { + assert name != null; + assert oldName != null; + assert name.startsWith("$"); + assert oldName.startsWith("$"); + + if (runtime.getSafeLevel() >= 4) { + throw runtime.newSecurityError("Insecure: can't alias global variable"); + } + + GlobalVariable oldVariable = createIfNotDefined(oldName); + GlobalVariable variable = (GlobalVariable)globalVariables.get(name); + + if (variable != null && oldVariable != variable && variable.isTracing()) { + throw new RaiseException(runtime, runtime.getRuntimeError(), "can't alias in tracer", false); + } + + globalVariables.put(name, oldVariable); + } + + public IRubyObject get(String name) { + assert name != null; + assert name.startsWith("$"); + + GlobalVariable variable = (GlobalVariable)globalVariables.get(name); + if (variable != null) return variable.getAccessor().getValue(); + + if (runtime.isVerbose()) { + runtime.getWarnings().warning(ID.GLOBAL_NOT_INITIALIZED, "global variable `" + name + "' not initialized", name); + } + return runtime.getNil(); + } + + public IRubyObject set(String name, IRubyObject value) { + assert name != null; + assert name.startsWith("$"); + + if (runtime.getSafeLevel() >= 4) { + throw runtime.newSecurityError("Insecure: can't change global variable value"); + } + + GlobalVariable variable = createIfNotDefined(name); + IRubyObject result = variable.getAccessor().setValue(value); + variable.trace(value); + return result; + } + + public IRubyObject clear(String name) { + return set(name, runtime.getNil()); + } + + public void setTraceVar(String name, RubyProc proc) { + assert name != null; + assert name.startsWith("$"); + + GlobalVariable variable = createIfNotDefined(name); + variable.addTrace(proc); + } + + public boolean untraceVar(String name, IRubyObject command) { + assert name != null; + assert name.startsWith("$"); + + if (isDefined(name)) { + GlobalVariable variable = (GlobalVariable)globalVariables.get(name); + return variable.removeTrace(command); + } + return false; + } + + public void untraceVar(String name) { + assert name != null; + assert name.startsWith("$"); + + if (isDefined(name)) { + GlobalVariable variable = (GlobalVariable)globalVariables.get(name); + variable.removeTraces(); + } + } + + public Set<String> getNames() { + return globalVariables.keySet(); + } + + private GlobalVariable createIfNotDefined(String name) { + GlobalVariable variable = (GlobalVariable)globalVariables.get(name); + if (variable == null) { + variable = GlobalVariable.newUndefined(runtime, name); + globalVariables.put(name, variable); + } + return variable; + } + + private IRubyObject defaultSeparator; + + public IRubyObject getDefaultSeparator() { + return defaultSeparator; + } + + public void setDefaultSeparator(IRubyObject defaultSeparator) { + this.defaultSeparator = defaultSeparator; + } +}

Debian ( Changelog | PTS | Bugs ) Ubuntu ( Changelog | txt | LP | Bugs ) | Diff from Ubuntu

Source: jsch

jsch (0.1.48-0ubuntu1) quantal; urgency=low [ Maarten Bezemer ] * New upstream release. - Updated debian/pom.xml - Refreshed jsch-build-xml.patch * Bumped Standards-Version to 3.9.3 - no changes required. [ James Page ] * d/manifest.mf: Updated version numbers for new upstream release. -- Maarten Bezemer <maarten.bezemer@gmail.com> Fri, 04 May 2012 10:39:23 +0200 jsch (0.1.42-2fakesync1) maverick; urgency=low * Fake sync due to mismatching orig tarball. -- Benjamin Drung <bdrung@ubuntu.com> Sun, 27 Jun 2010 23:17:34 +0200

Modifications :
  1. Download patch src/com/jcraft/jsch/KeyPair.java
  2. Download patch src/com/jcraft/jsch/ChannelDirectTCPIP.java

    --- 0.1.42-2/src/com/jcraft/jsch/ChannelDirectTCPIP.java 2009-07-13 07:07:24.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/ChannelDirectTCPIP.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,183 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch; - -import java.io.*; - -public class ChannelDirectTCPIP extends Channel{ - - static private final int LOCAL_WINDOW_SIZE_MAX=0x20000; - static private final int LOCAL_MAXIMUM_PACKET_SIZE=0x4000; - - String host; - int port; - - String originator_IP_address="127.0.0.1"; - int originator_port=0; - - ChannelDirectTCPIP(){ - super(); - setLocalWindowSizeMax(LOCAL_WINDOW_SIZE_MAX); - setLocalWindowSize(LOCAL_WINDOW_SIZE_MAX); - setLocalPacketSize(LOCAL_MAXIMUM_PACKET_SIZE); - } - - void init (){ - try{ - io=new IO(); - } - catch(Exception e){ - System.err.println(e); - } - } - - public void connect() throws JSchException{ - try{ - Session _session=getSession(); - if(!_session.isConnected()){ - throw new JSchException("session is down"); - } - Buffer buf=new Buffer(150); - Packet packet=new Packet(buf); - // send - // byte SSH_MSG_CHANNEL_OPEN(90) - // string channel type // - // uint32 sender channel // 0 - // uint32 initial window size // 0x100000(65536) - // uint32 maxmum packet size // 0x4000(16384) - - packet.reset(); - buf.putByte((byte)90); - buf.putString("direct-tcpip".getBytes()); - buf.putInt(id); - buf.putInt(lwsize); - buf.putInt(lmpsize); - buf.putString(host.getBytes()); - buf.putInt(port); - buf.putString(originator_IP_address.getBytes()); - buf.putInt(originator_port); - _session.write(packet); - - int retry=1000; - try{ - while(this.getRecipient()==-1 && - _session.isConnected() && - retry>0 && - !eof_remote){ - //Thread.sleep(500); - Thread.sleep(50); - retry--; - } - } - catch(Exception ee){ - } - if(!_session.isConnected()){ - throw new JSchException("session is down"); - } - if(retry==0 || this.eof_remote){ - throw new JSchException("channel is not opened."); - } - /* - if(this.eof_remote){ // failed to open - disconnect(); - return; - } - */ - - connected=true; - - if(io.in!=null){ - thread=new Thread(this); - thread.setName("DirectTCPIP thread "+_session.getHost()); - if(_session.daemon_thread){ - thread.setDaemon(_session.daemon_thread); - } - thread.start(); - } - } - catch(Exception e){ - io.close(); - io=null; - Channel.del(this); - if (e instanceof JSchException) { - throw (JSchException) e; - } - } - } - - public void run(){ - - Buffer buf=new Buffer(rmpsize); - Packet packet=new Packet(buf); - int i=0; - - try{ - Session _session=getSession(); - while(isConnected() && - thread!=null && - io!=null && - io.in!=null){ - i=io.in.read(buf.buffer, - 14, - buf.buffer.length-14 - -32 -20 // padding and mac - ); - - if(i<=0){ - eof(); - break; - } - if(close)break; - packet.reset(); - buf.putByte((byte)Session.SSH_MSG_CHANNEL_DATA); - buf.putInt(recipient); - buf.putInt(i); - buf.skip(i); - _session.write(packet, this, i); - } - } - catch(Exception e){ - } - disconnect(); - //System.err.println("connect end"); - } - - public void setInputStream(InputStream in){ - io.setInputStream(in); - } - public void setOutputStream(OutputStream out){ - io.setOutputStream(out); - } - - public void setHost(String host){this.host=host;} - public void setPort(int port){this.port=port;} - public void setOrgIPAddress(String foo){this.originator_IP_address=foo;} - public void setOrgPort(int foo){this.originator_port=foo;} -}
  3. Download patch src/com/jcraft/jsch/jce/SignatureDSA.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/SignatureDSA.java 2009-07-13 07:14:37.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/SignatureDSA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,147 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import java.math.BigInteger; -import java.security.*; -import java.security.spec.*; - -public class SignatureDSA implements com.jcraft.jsch.SignatureDSA{ - - java.security.Signature signature; - KeyFactory keyFactory; - - public void init() throws Exception{ - signature=java.security.Signature.getInstance("SHA1withDSA"); - keyFactory=KeyFactory.getInstance("DSA"); - } - public void setPubKey(byte[] y, byte[] p, byte[] q, byte[] g) throws Exception{ - DSAPublicKeySpec dsaPubKeySpec = - new DSAPublicKeySpec(new BigInteger(y), - new BigInteger(p), - new BigInteger(q), - new BigInteger(g)); - PublicKey pubKey=keyFactory.generatePublic(dsaPubKeySpec); - signature.initVerify(pubKey); - } - public void setPrvKey(byte[] x, byte[] p, byte[] q, byte[] g) throws Exception{ - DSAPrivateKeySpec dsaPrivKeySpec = - new DSAPrivateKeySpec(new BigInteger(x), - new BigInteger(p), - new BigInteger(q), - new BigInteger(g)); - PrivateKey prvKey = keyFactory.generatePrivate(dsaPrivKeySpec); - signature.initSign(prvKey); - } - public byte[] sign() throws Exception{ - byte[] sig=signature.sign(); -/* -System.err.print("sign["+sig.length+"] "); -for(int i=0; i<sig.length;i++){ -System.err.print(Integer.toHexString(sig[i]&0xff)+":"); -} -System.err.println(""); -*/ - // sig is in ASN.1 - // SEQUENCE::={ r INTEGER, s INTEGER } - int len=0; - int index=3; - len=sig[index++]&0xff; -//System.err.println("! len="+len); - byte[] r=new byte[len]; - System.arraycopy(sig, index, r, 0, r.length); - index=index+len+1; - len=sig[index++]&0xff; -//System.err.println("!! len="+len); - byte[] s=new byte[len]; - System.arraycopy(sig, index, s, 0, s.length); - - byte[] result=new byte[40]; - - // result must be 40 bytes, but length of r and s may not be 20 bytes - - System.arraycopy(r, (r.length>20)?1:0, - result, (r.length>20)?0:20-r.length, - (r.length>20)?20:r.length); - System.arraycopy(s, (s.length>20)?1:0, - result, (s.length>20)?20:40-s.length, - (s.length>20)?20:s.length); - -// System.arraycopy(sig, (sig[3]==20?4:5), result, 0, 20); -// System.arraycopy(sig, sig.length-20, result, 20, 20); - - return result; - } - public void update(byte[] foo) throws Exception{ - signature.update(foo); - } - public boolean verify(byte[] sig) throws Exception{ - int i=0; - int j=0; - byte[] tmp; - - if(sig[0]==0 && sig[1]==0 && sig[2]==0){ - j=((sig[i++]<<24)&0xff000000)|((sig[i++]<<16)&0x00ff0000)| - ((sig[i++]<<8)&0x0000ff00)|((sig[i++])&0x000000ff); - i+=j; - j=((sig[i++]<<24)&0xff000000)|((sig[i++]<<16)&0x00ff0000)| - ((sig[i++]<<8)&0x0000ff00)|((sig[i++])&0x000000ff); - tmp=new byte[j]; - System.arraycopy(sig, i, tmp, 0, j); sig=tmp; - } - - // ASN.1 - int frst=((sig[0]&0x80)!=0?1:0); - int scnd=((sig[20]&0x80)!=0?1:0); - //System.err.println("frst: "+frst+", scnd: "+scnd); - - int length=sig.length+6+frst+scnd; - tmp=new byte[length]; - tmp[0]=(byte)0x30; tmp[1]=(byte)0x2c; - tmp[1]+=frst; tmp[1]+=scnd; - tmp[2]=(byte)0x02; tmp[3]=(byte)0x14; - tmp[3]+=frst; - System.arraycopy(sig, 0, tmp, 4+frst, 20); - tmp[4+tmp[3]]=(byte)0x02; tmp[5+tmp[3]]=(byte)0x14; - tmp[5+tmp[3]]+=scnd; - System.arraycopy(sig, 20, tmp, 6+tmp[3]+scnd, 20); - sig=tmp; - -/* - tmp=new byte[sig.length+6]; - tmp[0]=(byte)0x30; tmp[1]=(byte)0x2c; - tmp[2]=(byte)0x02; tmp[3]=(byte)0x14; - System.arraycopy(sig, 0, tmp, 4, 20); - tmp[24]=(byte)0x02; tmp[25]=(byte)0x14; - System.arraycopy(sig, 20, tmp, 26, 20); sig=tmp; -*/ - return signature.verify(sig); - } -}
  4. Download patch src/com/jcraft/jsch/ChannelShell.java

    --- 0.1.42-2/src/com/jcraft/jsch/ChannelShell.java 2009-07-13 07:07:45.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/ChannelShell.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch; - -import java.util.*; - -public class ChannelShell extends ChannelSession{ - - ChannelShell(){ - super(); - pty=true; - } - - public void start() throws JSchException{ - Session _session=getSession(); - try{ - sendRequests(); - - Request request=new RequestShell(); - request.request(_session, this); - } - catch(Exception e){ - if(e instanceof JSchException) throw (JSchException)e; - if(e instanceof Throwable) - throw new JSchException("ChannelShell", (Throwable)e); - throw new JSchException("ChannelShell"); - } - - if(io.in!=null){ - thread=new Thread(this); - thread.setName("Shell for "+_session.host); - if(_session.daemon_thread){ - thread.setDaemon(_session.daemon_thread); - } - thread.start(); - } - } - - void init() throws JSchException { - io.setInputStream(getSession().in); - io.setOutputStream(getSession().out); - } -}
  5. Download patch src/com/jcraft/jsch/jce/KeyPairGenRSA.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/KeyPairGenRSA.java 2009-07-13 07:14:16.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/KeyPairGenRSA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,72 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import java.security.*; -import java.security.interfaces.*; - -public class KeyPairGenRSA implements com.jcraft.jsch.KeyPairGenRSA{ - byte[] d; // private - byte[] e; // public - byte[] n; - - byte[] c; // coefficient - byte[] ep; // exponent p - byte[] eq; // exponent q - byte[] p; // prime p - byte[] q; // prime q - - public void init(int key_size) throws Exception{ - KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA"); - keyGen.initialize(key_size, new SecureRandom()); - KeyPair pair = keyGen.generateKeyPair(); - - PublicKey pubKey=pair.getPublic(); - PrivateKey prvKey=pair.getPrivate(); - - d=((RSAPrivateKey)prvKey).getPrivateExponent().toByteArray(); - e=((RSAPublicKey)pubKey).getPublicExponent().toByteArray(); - n=((RSAPrivateKey)prvKey).getModulus().toByteArray(); - - c=((RSAPrivateCrtKey)prvKey).getCrtCoefficient().toByteArray(); - ep=((RSAPrivateCrtKey)prvKey).getPrimeExponentP().toByteArray(); - eq=((RSAPrivateCrtKey)prvKey).getPrimeExponentQ().toByteArray(); - p=((RSAPrivateCrtKey)prvKey).getPrimeP().toByteArray(); - q=((RSAPrivateCrtKey)prvKey).getPrimeQ().toByteArray(); - } - public byte[] getD(){return d;} - public byte[] getE(){return e;} - public byte[] getN(){return n;} - public byte[] getC(){return c;} - public byte[] getEP(){return ep;} - public byte[] getEQ(){return eq;} - public byte[] getP(){return p;} - public byte[] getQ(){return q;} -}
  6. Download patch src/com/jcraft/jsch/jcraft/HMACMD5.java

    --- 0.1.42-2/src/com/jcraft/jsch/jcraft/HMACMD5.java 2009-07-13 07:15:16.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jcraft/HMACMD5.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,51 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2006-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jcraft; - -import com.jcraft.jsch.MAC; -import java.security.*; - -public class HMACMD5 extends HMAC implements MAC{ - private static final String name="hmac-md5"; - - public HMACMD5(){ - super(); - MessageDigest md=null; - try{ md=MessageDigest.getInstance("MD5"); } - catch(Exception e){ - System.err.println(e); - } - setH(md); - } - - public String getName(){ - return name; - } -}
  7. Download patch src/com/jcraft/jsch/HASH.java

    --- 0.1.42-2/src/com/jcraft/jsch/HASH.java 2009-07-13 07:08:29.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/HASH.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,37 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch; - -public interface HASH{ - void init() throws Exception; - int getBlockSize(); - void update(byte[] foo, int start, int len) throws Exception; - byte[] digest() throws Exception; -}
  8. Download patch examples/Shell.java

    --- 0.1.42-2/examples/Shell.java 2008-04-17 18:10:58.000000000 +0000 +++ 0.1.48-0ubuntu1/examples/Shell.java 2012-04-17 22:03:12.000000000 +0000 @@ -1,4 +1,13 @@ /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ +/** + * This program enables you to connect to sshd server and get the shell prompt. + * $ CLASSPATH=.:../build javac Shell.java + * $ CLASSPATH=.:../build java Shell + * You will be asked username, hostname and passwd. + * If everything works fine, you will get the shell prompt. Output will + * be ugly because of lacks of terminal-emulation, but you can issue commands. + * + */ import com.jcraft.jsch.*; import java.awt.*; import javax.swing.*; @@ -25,12 +34,36 @@ public class Shell{ Session session=jsch.getSession(user, host, 22); - //session.setPassword("your password"); + String passwd = JOptionPane.showInputDialog("Enter password"); + session.setPassword(passwd); + + UserInfo ui = new MyUserInfo(){ + public void showMessage(String message){ + JOptionPane.showMessageDialog(null, message); + } + public boolean promptYesNo(String message){ + Object[] options={ "yes", "no" }; + int foo=JOptionPane.showOptionDialog(null, + message, + "Warning", + JOptionPane.DEFAULT_OPTION, + JOptionPane.WARNING_MESSAGE, + null, options, options[0]); + return foo==0; + } + + // If password is not given before the invocation of Session#connect(), + // implement also following methods, + // * UserInfo#getPassword(), + // * UserInfo#promptPassword(String message) and + // * UIKeyboardInteractive#promptKeyboardInteractive() + + }; - // username and password will be given via UserInfo interface. - UserInfo ui=new MyUserInfo(); session.setUserInfo(ui); + // It must not be recommended, but if you want to skip host-key check, + // invoke following, // session.setConfig("StrictHostKeyChecking", "no"); //session.connect(); @@ -71,97 +104,20 @@ public class Shell{ } } - public static class MyUserInfo implements UserInfo, UIKeyboardInteractive{ - public String getPassword(){ return passwd; } - public boolean promptYesNo(String str){ - Object[] options={ "yes", "no" }; - int foo=JOptionPane.showOptionDialog(null, - str, - "Warning", - JOptionPane.DEFAULT_OPTION, - JOptionPane.WARNING_MESSAGE, - null, options, options[0]); - return foo==0; - } - - String passwd; - JTextField passwordField=(JTextField)new JPasswordField(20); - + public static abstract class MyUserInfo + implements UserInfo, UIKeyboardInteractive{ + public String getPassword(){ return null; } + public boolean promptYesNo(String str){ return false; } public String getPassphrase(){ return null; } - public boolean promptPassphrase(String message){ return true; } - public boolean promptPassword(String message){ - Object[] ob={passwordField}; - int result=JOptionPane.showConfirmDialog(null, ob, message, - JOptionPane.OK_CANCEL_OPTION); - if(result==JOptionPane.OK_OPTION){ - passwd=passwordField.getText(); - return true; - } - else{ - return false; - } - } - public void showMessage(String message){ - JOptionPane.showMessageDialog(null, message); - } - final GridBagConstraints gbc = - new GridBagConstraints(0,0,1,1,1,1, - GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, - new Insets(0,0,0,0),0,0); - private Container panel; + public boolean promptPassphrase(String message){ return false; } + public boolean promptPassword(String message){ return false; } + public void showMessage(String message){ } public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo){ - panel = new JPanel(); - panel.setLayout(new GridBagLayout()); - - gbc.weightx = 1.0; - gbc.gridwidth = GridBagConstraints.REMAINDER; - gbc.gridx = 0; - panel.add(new JLabel(instruction), gbc); - gbc.gridy++; - - gbc.gridwidth = GridBagConstraints.RELATIVE; - - JTextField[] texts=new JTextField[prompt.length]; - for(int i=0; i<prompt.length; i++){ - gbc.fill = GridBagConstraints.NONE; - gbc.gridx = 0; - gbc.weightx = 1; - panel.add(new JLabel(prompt[i]),gbc); - - gbc.gridx = 1; - gbc.fill = GridBagConstraints.HORIZONTAL; - gbc.weighty = 1; - if(echo[i]){ - texts[i]=new JTextField(20); - } - else{ - texts[i]=new JPasswordField(20); - } - panel.add(texts[i], gbc); - gbc.gridy++; - } - - if(JOptionPane.showConfirmDialog(null, panel, - destination+": "+name, - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.QUESTION_MESSAGE) - ==JOptionPane.OK_OPTION){ - String[] response=new String[prompt.length]; - for(int i=0; i<prompt.length; i++){ - response[i]=texts[i].getText(); - } - return response; - } - else{ - return null; // cancel - } + return null; } } } - -
  9. Download patch src/com/jcraft/jsch/KeyExchange.java

    --- 0.1.42-2/src/com/jcraft/jsch/KeyExchange.java 2009-07-13 07:09:12.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/KeyExchange.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,168 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch; - -public abstract class KeyExchange{ - - static final int PROPOSAL_KEX_ALGS=0; - static final int PROPOSAL_SERVER_HOST_KEY_ALGS=1; - static final int PROPOSAL_ENC_ALGS_CTOS=2; - static final int PROPOSAL_ENC_ALGS_STOC=3; - static final int PROPOSAL_MAC_ALGS_CTOS=4; - static final int PROPOSAL_MAC_ALGS_STOC=5; - static final int PROPOSAL_COMP_ALGS_CTOS=6; - static final int PROPOSAL_COMP_ALGS_STOC=7; - static final int PROPOSAL_LANG_CTOS=8; - static final int PROPOSAL_LANG_STOC=9; - static final int PROPOSAL_MAX=10; - - //static String kex_algs="diffie-hellman-group-exchange-sha1"+ - // ",diffie-hellman-group1-sha1"; - -//static String kex="diffie-hellman-group-exchange-sha1"; - static String kex="diffie-hellman-group1-sha1"; - static String server_host_key="ssh-rsa,ssh-dss"; - static String enc_c2s="blowfish-cbc"; - static String enc_s2c="blowfish-cbc"; - static String mac_c2s="hmac-md5"; // hmac-md5,hmac-sha1,hmac-ripemd160, - // hmac-sha1-96,hmac-md5-96 - static String mac_s2c="hmac-md5"; -//static String comp_c2s="none"; // zlib -//static String comp_s2c="none"; - static String lang_c2s=""; - static String lang_s2c=""; - - public static final int STATE_END=0; - - protected Session session=null; - protected HASH sha=null; - protected byte[] K=null; - protected byte[] H=null; - protected byte[] K_S=null; - - public abstract void init(Session session, - byte[] V_S, byte[] V_C, byte[] I_S, byte[] I_C) throws Exception; - public abstract boolean next(Buffer buf) throws Exception; - public abstract String getKeyType(); - public abstract int getState(); - - /* - void dump(byte[] foo){ - for(int i=0; i<foo.length; i++){ - if((foo[i]&0xf0)==0)System.err.print("0"); - System.err.print(Integer.toHexString(foo[i]&0xff)); - if(i%16==15){System.err.println(""); continue;} - if(i%2==1)System.err.print(" "); - } - } - */ - - protected static String[] guess(byte[]I_S, byte[]I_C){ -//System.err.println("guess: "); - String[] guess=new String[PROPOSAL_MAX]; - Buffer sb=new Buffer(I_S); sb.setOffSet(17); - Buffer cb=new Buffer(I_C); cb.setOffSet(17); - - for(int i=0; i<PROPOSAL_MAX; i++){ - byte[] sp=sb.getString(); // server proposal - byte[] cp=cb.getString(); // client proposal - -//System.err.println("server-proposal: |"+new String(sp)+"|"); -//System.err.println("client-proposal: |"+new String(cp)+"|"); - - int j=0; - int k=0; -//System.err.println(new String(cp)); - loop: - while(j<cp.length){ - while(j<cp.length && cp[j]!=',')j++; - if(k==j) return null; - String algorithm=new String(cp, k, j-k); -//System.err.println("algorithm: "+algorithm); - int l=0; - int m=0; - while(l<sp.length){ - while(l<sp.length && sp[l]!=',')l++; - if(m==l) return null; -//System.err.println(" "+new String(sp, m, l-m)); - if(algorithm.equals(new String(sp, m, l-m))){ - guess[i]=algorithm; -//System.err.println(" "+algorithm); - break loop; - } - l++; - m=l; - } - j++; - k=j; - } - if(j==0){ - guess[i]=""; - } - else if(guess[i]==null){ -//System.err.println(" fail"); - return null; - } - } - - if(JSch.getLogger().isEnabled(Logger.INFO)){ - JSch.getLogger().log(Logger.INFO, - "kex: server->client"+ - " "+guess[PROPOSAL_ENC_ALGS_STOC]+ - " "+guess[PROPOSAL_MAC_ALGS_STOC]+ - " "+guess[PROPOSAL_COMP_ALGS_STOC]); - JSch.getLogger().log(Logger.INFO, - "kex: client->server"+ - " "+guess[PROPOSAL_ENC_ALGS_CTOS]+ - " "+guess[PROPOSAL_MAC_ALGS_CTOS]+ - " "+guess[PROPOSAL_COMP_ALGS_CTOS]); - } - -// for(int i=0; i<PROPOSAL_MAX; i++){ -// System.err.println("guess: ["+guess[i]+"]"); -// } - - return guess; - } - - public String getFingerPrint(){ - HASH hash=null; - try{ - Class c=Class.forName(session.getConfig("md5")); - hash=(HASH)(c.newInstance()); - } - catch(Exception e){ System.err.println("getFingerPrint: "+e); } - return Util.getFingerPrint(hash, getHostKey()); - } - byte[] getK(){ return K; } - byte[] getH(){ return H; } - HASH getHash(){ return sha; } - byte[] getHostKey(){ return K_S; } -}
  10. Download patch src/com/jcraft/jsch/jcraft/HMAC.java

    --- 0.1.42-2/src/com/jcraft/jsch/jcraft/HMAC.java 2009-07-13 07:15:12.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jcraft/HMAC.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,107 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2006-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jcraft; - -import java.security.*; - -class HMAC{ - - /* - * Refer to RFC2104. - * - * H(K XOR opad, H(K XOR ipad, text)) - * - * where K is an n byte key - * ipad is the byte 0x36 repeated 64 times - * opad is the byte 0x5c repeated 64 times - * and text is the data being protected - */ - private static final int B=64; - private byte[] k_ipad=null; - private byte[] k_opad=null; - - private MessageDigest md=null; - - private int bsize=0; - - protected void setH(MessageDigest md){ - this.md=md; - bsize=md.getDigestLength(); - } - - public int getBlockSize(){return bsize;}; - public void init(byte[] key) throws Exception{ - if(key.length>bsize){ - byte[] tmp=new byte[bsize]; - System.arraycopy(key, 0, tmp, 0, bsize); - key=tmp; - } - - /* if key is longer than B bytes reset it to key=MD5(key) */ - if(key.length>B){ - md.update(key, 0, key.length); - key=md.digest(); - } - - k_ipad=new byte[B]; - System.arraycopy(key, 0, k_ipad, 0, key.length); - k_opad=new byte[B]; - System.arraycopy(key, 0, k_opad, 0, key.length); - - /* XOR key with ipad and opad values */ - for(int i=0; i<B; i++) { - k_ipad[i]^=(byte)0x36; - k_opad[i]^=(byte)0x5c; - } - - md.update(k_ipad, 0, B); - } - - private final byte[] tmp=new byte[4]; - public void update(int i){ - tmp[0]=(byte)(i>>>24); - tmp[1]=(byte)(i>>>16); - tmp[2]=(byte)(i>>>8); - tmp[3]=(byte)i; - update(tmp, 0, 4); - } - - public void update(byte foo[], int s, int l){ - md.update(foo, s, l); - } - - public void doFinal(byte[] buf, int offset){ - byte[] result=md.digest(); - md.update(k_opad, 0, B); - md.update(result, 0, bsize); - try{md.digest(buf, offset, bsize);}catch(Exception e){} - md.update(k_ipad, 0, B); - } -}
  11. Download patch src/com/jcraft/jsch/jce/ARCFOUR.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/ARCFOUR.java 2009-07-13 07:26:03.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/ARCFOUR.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,67 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2008-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import com.jcraft.jsch.Cipher; -import javax.crypto.*; -import javax.crypto.spec.*; - -public class ARCFOUR implements Cipher{ - private static final int ivsize=8; - private static final int bsize=16; - private javax.crypto.Cipher cipher; - public int getIVSize(){return ivsize;} - public int getBlockSize(){return bsize;} - public void init(int mode, byte[] key, byte[] iv) throws Exception{ - String pad="NoPadding"; - byte[] tmp; - if(key.length>bsize){ - tmp=new byte[bsize]; - System.arraycopy(key, 0, tmp, 0, tmp.length); - key=tmp; - } - - try{ - cipher=javax.crypto.Cipher.getInstance("RC4"); - SecretKeySpec _key = new SecretKeySpec(key, "RC4"); - cipher.init((mode==ENCRYPT_MODE? - javax.crypto.Cipher.ENCRYPT_MODE: - javax.crypto.Cipher.DECRYPT_MODE), - _key); - } - catch(Exception e){ - cipher=null; - throw e; - } - } - public void update(byte[] foo, int s1, int len, byte[] bar, int s2) throws Exception{ - cipher.update(foo, s1, len, bar, s2); - } -}
  12. Download patch examples/Exec.java

    --- 0.1.42-2/examples/Exec.java 2007-10-15 11:00:47.000000000 +0000 +++ 0.1.48-0ubuntu1/examples/Exec.java 2012-04-17 22:04:30.000000000 +0000 @@ -1,4 +1,13 @@ /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ +/** + * This program will demonstrate remote exec. + * $ CLASSPATH=.:../build javac Exec.java + * $ CLASSPATH=.:../build java Exec + * You will be asked username, hostname, displayname, passwd and command. + * If everything works fine, given command will be invoked + * on the remote side and outputs will be printed out. + * + */ import com.jcraft.jsch.*; import java.awt.*; import javax.swing.*;
  13. Download patch examples/Sudo.java

    --- 0.1.42-2/examples/Sudo.java 1970-01-01 00:00:00.000000000 +0000 +++ 0.1.48-0ubuntu1/examples/Sudo.java 2012-04-17 23:07:56.000000000 +0000 @@ -0,0 +1,184 @@ +/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ +/** + * This program will demonstrate how to exec 'sudo' on the remote. + * + */ +import com.jcraft.jsch.*; +import java.awt.*; +import javax.swing.*; +import java.io.*; + +public class Sudo{ + public static void main(String[] arg){ + try{ + JSch jsch=new JSch(); + + String host=null; + if(arg.length>0){ + host=arg[0]; + } + else{ + host=JOptionPane.showInputDialog("Enter username@hostname", + System.getProperty("user.name")+ + "@localhost"); + } + String user=host.substring(0, host.indexOf('@')); + host=host.substring(host.indexOf('@')+1); + + Session session=jsch.getSession(user, host, 22); + + UserInfo ui=new MyUserInfo(); + session.setUserInfo(ui); + session.connect(); + + String command=JOptionPane.showInputDialog("Enter command, execed with sudo", + "printenv SUDO_USER"); + + String sudo_pass=null; + { + JTextField passwordField=(JTextField)new JPasswordField(8); + Object[] ob={passwordField}; + int result= + JOptionPane.showConfirmDialog(null, + ob, + "Enter password for sudo", + JOptionPane.OK_CANCEL_OPTION); + if(result!=JOptionPane.OK_OPTION){ + System.exit(-1); + } + sudo_pass=passwordField.getText(); + } + + Channel channel=session.openChannel("exec"); + + // man sudo + // -S The -S (stdin) option causes sudo to read the password from the + // standard input instead of the terminal device. + // -p The -p (prompt) option allows you to override the default + // password prompt and use a custom one. + ((ChannelExec)channel).setCommand("sudo -S -p '' "+command); + + + InputStream in=channel.getInputStream(); + OutputStream out=channel.getOutputStream(); + ((ChannelExec)channel).setErrStream(System.err); + + channel.connect(); + + out.write((sudo_pass+"\n").getBytes()); + out.flush(); + + byte[] tmp=new byte[1024]; + while(true){ + while(in.available()>0){ + int i=in.read(tmp, 0, 1024); + if(i<0)break; + System.out.print(new String(tmp, 0, i)); + } + if(channel.isClosed()){ + System.out.println("exit-status: "+channel.getExitStatus()); + break; + } + try{Thread.sleep(1000);}catch(Exception ee){} + } + channel.disconnect(); + session.disconnect(); + } + catch(Exception e){ + System.out.println(e); + } + } + + public static class MyUserInfo implements UserInfo, UIKeyboardInteractive{ + public String getPassword(){ return passwd; } + public boolean promptYesNo(String str){ + Object[] options={ "yes", "no" }; + int foo=JOptionPane.showOptionDialog(null, + str, + "Warning", + JOptionPane.DEFAULT_OPTION, + JOptionPane.WARNING_MESSAGE, + null, options, options[0]); + return foo==0; + } + + String passwd; + JTextField passwordField=(JTextField)new JPasswordField(20); + + public String getPassphrase(){ return null; } + public boolean promptPassphrase(String message){ return true; } + public boolean promptPassword(String message){ + Object[] ob={passwordField}; + int result= + JOptionPane.showConfirmDialog(null, ob, message, + JOptionPane.OK_CANCEL_OPTION); + if(result==JOptionPane.OK_OPTION){ + passwd=passwordField.getText(); + return true; + } + else{ + return false; + } + } + public void showMessage(String message){ + JOptionPane.showMessageDialog(null, message); + } + final GridBagConstraints gbc = + new GridBagConstraints(0,0,1,1,1,1, + GridBagConstraints.NORTHWEST, + GridBagConstraints.NONE, + new Insets(0,0,0,0),0,0); + private Container panel; + public String[] promptKeyboardInteractive(String destination, + String name, + String instruction, + String[] prompt, + boolean[] echo){ + panel = new JPanel(); + panel.setLayout(new GridBagLayout()); + + gbc.weightx = 1.0; + gbc.gridwidth = GridBagConstraints.REMAINDER; + gbc.gridx = 0; + panel.add(new JLabel(instruction), gbc); + gbc.gridy++; + + gbc.gridwidth = GridBagConstraints.RELATIVE; + + JTextField[] texts=new JTextField[prompt.length]; + for(int i=0; i<prompt.length; i++){ + gbc.fill = GridBagConstraints.NONE; + gbc.gridx = 0; + gbc.weightx = 1; + panel.add(new JLabel(prompt[i]),gbc); + + gbc.gridx = 1; + gbc.fill = GridBagConstraints.HORIZONTAL; + gbc.weighty = 1; + if(echo[i]){ + texts[i]=new JTextField(20); + } + else{ + texts[i]=new JPasswordField(20); + } + panel.add(texts[i], gbc); + gbc.gridy++; + } + + if(JOptionPane.showConfirmDialog(null, panel, + destination+": "+name, + JOptionPane.OK_CANCEL_OPTION, + JOptionPane.QUESTION_MESSAGE) + ==JOptionPane.OK_OPTION){ + String[] response=new String[prompt.length]; + for(int i=0; i<prompt.length; i++){ + response[i]=texts[i].getText(); + } + return response; + } + else{ + return null; // cancel + } + } + } +}
  14. Download patch LICENSE.txt

    --- 0.1.42-2/LICENSE.txt 2009-07-13 07:06:22.000000000 +0000 +++ 0.1.48-0ubuntu1/LICENSE.txt 2012-01-31 22:21:46.000000000 +0000 @@ -2,7 +2,7 @@ JSch 0.0.* was released under the GNU LG over to a BSD-style license. ------------------------------------------------------------------------------ -Copyright (c) 2002,2003,2004,2005,2006,2007,2008,2009 Atsuhiko Yamanaka, JCraft,Inc. +Copyright (c) 2002-2012 Atsuhiko Yamanaka, JCraft,Inc. All rights reserved. Redistribution and use in source and binary forms, with or without
  15. Download patch src/com/jcraft/jsch/jce/SignatureRSA.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/SignatureRSA.java 2009-07-13 07:14:41.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/SignatureRSA.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import java.math.BigInteger; -import java.security.*; -import java.security.spec.*; - -public class SignatureRSA implements com.jcraft.jsch.SignatureRSA{ - - java.security.Signature signature; - KeyFactory keyFactory; - - public void init() throws Exception{ - signature=java.security.Signature.getInstance("SHA1withRSA"); - keyFactory=KeyFactory.getInstance("RSA"); - } - public void setPubKey(byte[] e, byte[] n) throws Exception{ - RSAPublicKeySpec rsaPubKeySpec = - new RSAPublicKeySpec(new BigInteger(n), - new BigInteger(e)); - PublicKey pubKey=keyFactory.generatePublic(rsaPubKeySpec); - signature.initVerify(pubKey); - } - public void setPrvKey(byte[] d, byte[] n) throws Exception{ - RSAPrivateKeySpec rsaPrivKeySpec = - new RSAPrivateKeySpec(new BigInteger(n), - new BigInteger(d)); - PrivateKey prvKey = keyFactory.generatePrivate(rsaPrivKeySpec); - signature.initSign(prvKey); - } - public byte[] sign() throws Exception{ - byte[] sig=signature.sign(); - return sig; - } - public void update(byte[] foo) throws Exception{ - signature.update(foo); - } - public boolean verify(byte[] sig) throws Exception{ - int i=0; - int j=0; - byte[] tmp; - - if(sig[0]==0 && sig[1]==0 && sig[2]==0){ - j=((sig[i++]<<24)&0xff000000)|((sig[i++]<<16)&0x00ff0000)| - ((sig[i++]<<8)&0x0000ff00)|((sig[i++])&0x000000ff); - i+=j; - j=((sig[i++]<<24)&0xff000000)|((sig[i++]<<16)&0x00ff0000)| - ((sig[i++]<<8)&0x0000ff00)|((sig[i++])&0x000000ff); - tmp=new byte[j]; - System.arraycopy(sig, i, tmp, 0, j); sig=tmp; - } -//System.err.println("j="+j+" "+Integer.toHexString(sig[0]&0xff)); - return signature.verify(sig); - } -}
  16. Download patch examples/Compression.java

    --- 0.1.42-2/examples/Compression.java 2007-10-15 11:00:15.000000000 +0000 +++ 0.1.48-0ubuntu1/examples/Compression.java 2012-04-17 22:08:20.000000000 +0000 @@ -1,4 +1,13 @@ /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ +/** + * This program will demonstrate the packet compression. + * $ CLASSPATH=.:../build javac Compression.java + * $ CLASSPATH=.:../build java Compression + * You will be asked username, hostname and passwd. + * If everything works fine, you will get the shell prompt. + * In this program, all data from sshd server to jsch will be compressed. + * + */ import com.jcraft.jsch.*; import java.awt.*; import javax.swing.*;
  17. Download patch src/com/jcraft/jsch/jce/TripleDESCTR.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/TripleDESCTR.java 2009-07-13 07:27:04.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/TripleDESCTR.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2008-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import com.jcraft.jsch.Cipher; -import javax.crypto.*; -import javax.crypto.spec.*; - -public class TripleDESCTR implements Cipher{ - private static final int ivsize=8; - private static final int bsize=24; - private javax.crypto.Cipher cipher; - public int getIVSize(){return ivsize;} - public int getBlockSize(){return bsize;} - public void init(int mode, byte[] key, byte[] iv) throws Exception{ - String pad="NoPadding"; - //if(padding) pad="PKCS5Padding"; - byte[] tmp; - if(iv.length>ivsize){ - tmp=new byte[ivsize]; - System.arraycopy(iv, 0, tmp, 0, tmp.length); - iv=tmp; - } - if(key.length>bsize){ - tmp=new byte[bsize]; - System.arraycopy(key, 0, tmp, 0, tmp.length); - key=tmp; - } - - try{ - cipher=javax.crypto.Cipher.getInstance("DESede/CTR/"+pad); -/* - // The following code does not work on IBM's JDK 1.4.1 - SecretKeySpec skeySpec = new SecretKeySpec(key, "DESede"); - cipher.init((mode==ENCRYPT_MODE? - javax.crypto.Cipher.ENCRYPT_MODE: - javax.crypto.Cipher.DECRYPT_MODE), - skeySpec, new IvParameterSpec(iv)); -*/ - DESedeKeySpec keyspec=new DESedeKeySpec(key); - SecretKeyFactory keyfactory=SecretKeyFactory.getInstance("DESede"); - SecretKey _key=keyfactory.generateSecret(keyspec); - cipher.init((mode==ENCRYPT_MODE? - javax.crypto.Cipher.ENCRYPT_MODE: - javax.crypto.Cipher.DECRYPT_MODE), - _key, new IvParameterSpec(iv)); - } - catch(Exception e){ - cipher=null; - throw e; - } - } - public void update(byte[] foo, int s1, int len, byte[] bar, int s2) throws Exception{ - cipher.update(foo, s1, len, bar, s2); - } -}
  18. Download patch src/com/jcraft/jsch/jce/ARCFOUR128.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/ARCFOUR128.java 2009-07-13 07:26:08.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/ARCFOUR128.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2008-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import com.jcraft.jsch.Cipher; -import javax.crypto.*; -import javax.crypto.spec.*; - -public class ARCFOUR128 implements Cipher{ - private static final int ivsize=8; - private static final int bsize=16; - private static final int skip=1536; - private javax.crypto.Cipher cipher; - public int getIVSize(){return ivsize;} - public int getBlockSize(){return bsize;} - public void init(int mode, byte[] key, byte[] iv) throws Exception{ - byte[] tmp; - if(key.length>bsize){ - tmp=new byte[bsize]; - System.arraycopy(key, 0, tmp, 0, tmp.length); - key=tmp; - } - try{ - cipher=javax.crypto.Cipher.getInstance("RC4"); - SecretKeySpec _key = new SecretKeySpec(key, "RC4"); - cipher.init((mode==ENCRYPT_MODE? - javax.crypto.Cipher.ENCRYPT_MODE: - javax.crypto.Cipher.DECRYPT_MODE), - _key); - byte[] foo=new byte[1]; - for(int i=0; i<skip; i++){ - cipher.update(foo, 0, 1, foo, 0); - } - } - catch(Exception e){ - cipher=null; - throw e; - } - } - public void update(byte[] foo, int s1, int len, byte[] bar, int s2) throws Exception{ - cipher.update(foo, s1, len, bar, s2); - } -}
  19. Download patch src/com/jcraft/jsch/HostKey.java

    --- 0.1.42-2/src/com/jcraft/jsch/HostKey.java 2009-07-13 07:08:33.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/HostKey.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,104 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch; - -public class HostKey{ - private static final byte[] sshdss="ssh-dss".getBytes(); - private static final byte[] sshrsa="ssh-rsa".getBytes(); - - protected static final int GUESS=0; - public static final int SSHDSS=1; - public static final int SSHRSA=2; - static final int UNKNOWN=3; - - protected String host; - protected int type; - protected byte[] key; - - public HostKey(String host, byte[] key) throws JSchException { - this(host, GUESS, key); - } - - public HostKey(String host, int type, byte[] key) throws JSchException { - this.host=host; - if(type==GUESS){ - if(key[8]=='d'){ this.type=SSHDSS; } - else if(key[8]=='r'){ this.type=SSHRSA; } - else { throw new JSchException("invalid key type");} - } - else{ - this.type=type; - } - this.key=key; - } - - public String getHost(){ return host; } - public String getType(){ - if(type==SSHDSS){ return new String(sshdss); } - if(type==SSHRSA){ return new String(sshrsa);} - return "UNKNOWN"; - } - public String getKey(){ - return new String(Util.toBase64(key, 0, key.length)); - } - public String getFingerPrint(JSch jsch){ - HASH hash=null; - try{ - Class c=Class.forName(jsch.getConfig("md5")); - hash=(HASH)(c.newInstance()); - } - catch(Exception e){ System.err.println("getFingerPrint: "+e); } - return Util.getFingerPrint(hash, key); - } - - boolean isMatched(String _host){ - return isIncluded(_host); - } - - private boolean isIncluded(String _host){ - int i=0; - String hosts=this.host; - int hostslen=hosts.length(); - int hostlen=_host.length(); - int j; - while(i<hostslen){ - j=hosts.indexOf(',', i); - if(j==-1){ - if(hostlen!=hostslen-i) return false; - return hosts.regionMatches(true, i, _host, 0, hostlen); - } - if(hostlen==(j-i)){ - if(hosts.regionMatches(true, i, _host, 0, hostlen)) return true; - } - i=j+1; - } - return false; - } -}
  20. Download patch src/com/jcraft/jsch/jce/TripleDESCBC.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/TripleDESCBC.java 2009-07-13 07:14:45.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/TripleDESCBC.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import com.jcraft.jsch.Cipher; -import javax.crypto.*; -import javax.crypto.spec.*; - -public class TripleDESCBC implements Cipher{ - private static final int ivsize=8; - private static final int bsize=24; - private javax.crypto.Cipher cipher; - public int getIVSize(){return ivsize;} - public int getBlockSize(){return bsize;} - public void init(int mode, byte[] key, byte[] iv) throws Exception{ - String pad="NoPadding"; - //if(padding) pad="PKCS5Padding"; - byte[] tmp; - if(iv.length>ivsize){ - tmp=new byte[ivsize]; - System.arraycopy(iv, 0, tmp, 0, tmp.length); - iv=tmp; - } - if(key.length>bsize){ - tmp=new byte[bsize]; - System.arraycopy(key, 0, tmp, 0, tmp.length); - key=tmp; - } - - try{ - cipher=javax.crypto.Cipher.getInstance("DESede/CBC/"+pad); -/* - // The following code does not work on IBM's JDK 1.4.1 - SecretKeySpec skeySpec = new SecretKeySpec(key, "DESede"); - cipher.init((mode==ENCRYPT_MODE? - javax.crypto.Cipher.ENCRYPT_MODE: - javax.crypto.Cipher.DECRYPT_MODE), - skeySpec, new IvParameterSpec(iv)); -*/ - DESedeKeySpec keyspec=new DESedeKeySpec(key); - SecretKeyFactory keyfactory=SecretKeyFactory.getInstance("DESede"); - SecretKey _key=keyfactory.generateSecret(keyspec); - cipher.init((mode==ENCRYPT_MODE? - javax.crypto.Cipher.ENCRYPT_MODE: - javax.crypto.Cipher.DECRYPT_MODE), - _key, new IvParameterSpec(iv)); - } - catch(Exception e){ - cipher=null; - throw e; - } - } - public void update(byte[] foo, int s1, int len, byte[] bar, int s2) throws Exception{ - cipher.update(foo, s1, len, bar, s2); - } -}
  21. Download patch src/com/jcraft/jsch/CipherNone.java

    --- 0.1.42-2/src/com/jcraft/jsch/CipherNone.java 2009-07-13 07:08:01.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/CipherNone.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch; - -public class CipherNone implements Cipher{ - private static final int ivsize=8; - private static final int bsize=16; - public int getIVSize(){return ivsize;} - public int getBlockSize(){return bsize;} - public void init(int mode, byte[] key, byte[] iv) throws Exception{ - } - public void update(byte[] foo, int s1, int len, byte[] bar, int s2) throws Exception{ - } -}
  22. Download patch examples/UserAuthKI.java

    --- 0.1.42-2/examples/UserAuthKI.java 2007-10-15 11:02:45.000000000 +0000 +++ 0.1.48-0ubuntu1/examples/UserAuthKI.java 2012-04-17 22:10:50.000000000 +0000 @@ -1,4 +1,12 @@ /* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ +/** + * This program will demonstrate the keyboard-interactive authentication. + * $ CLASSPATH=.:../build javac UserAuthKI.java + * $ CLASSPATH=.:../build java UserAuthKI + * If the remote sshd supports keyboard-interactive authentication, + * you will be prompted. + * + */ import com.jcraft.jsch.*; import java.awt.*; import javax.swing.*;
  23. Download patch debian/control

    --- 0.1.42-2/debian/control 2010-06-27 18:47:46.000000000 +0000 +++ 0.1.48-0ubuntu1/debian/control 2012-06-15 08:19:42.000000000 +0000 @@ -1,13 +1,14 @@ Source: jsch Section: java Priority: optional -Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> +XSBC-Original-Maintainer: Debian Java Maintainers <pkg-java-maintainers@lists.alioth.debian.org> Uploaders: Michael Koch <konqueror@gmx.de>, Ludovic Claude <ludovic.claude@laposte.net>, Niels Thykier <niels@thykier.net> Build-Depends: debhelper (>= 7), cdbs, default-jdk Build-Depends-Indep: maven-repo-helper, ant (>= 1.6.5) -Standards-Version: 3.8.4 +Standards-Version: 3.9.3 Vcs-Svn: svn://svn.debian.org/svn/pkg-java/trunk/jsch Vcs-Browser: http://svn.debian.org/wsvn/pkg-java/trunk/jsch Homepage: http://www.jcraft.com/jsch/
  24. Download patch src/com/jcraft/jsch/jce/Random.java

    --- 0.1.42-2/src/com/jcraft/jsch/jce/Random.java 2009-07-13 07:14:24.000000000 +0000 +++ 0.1.48-0ubuntu1/src/com/jcraft/jsch/jce/Random.java 1970-01-01 00:00:00.000000000 +0000 @@ -1,81 +0,0 @@ -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* -Copyright (c) 2002-2009 ymnk, JCraft,Inc. 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 names of the authors may not be used to endorse or promote products - derived from this software without specific prior written permission. - -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 JCRAFT, -INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE 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. -*/ - -package com.jcraft.jsch.jce; - -import java.security.SecureRandom; - -public class Random implements com.jcraft.jsch.Random{ - private byte[] tmp=new byte[16]; - private SecureRandom random=null; - public Random(){ - - // We hope that 'new SecureRandom()' will use NativePRNG algorithm - // on Sun's Java5 for GNU/Linux and Solaris. - // It seems NativePRNG refers to /dev/urandom and it must not be blocked, - // but NativePRNG is slower than SHA1PRNG ;-< - // TIPS: By adding option '-Djava.security.egd=file:/dev/./urandom' - // SHA1PRNG will be used instead of NativePRNG. - // On MacOSX, 'new SecureRandom()' will use NativePRNG algorithm and - // it is also slower than SHA1PRNG. - // On Windows, 'new SecureRandom()' will use SHA1PRNG algorithm. - random=new SecureRandom(); - - /* - try{ - random=SecureRandom.getInstance("SHA1PRNG"); - return; - } - catch(java.security.NoSuchAlgorithmException e){ - // System.err.println(e); - } - - // The following code is for IBM's JCE - try{ - random=SecureRandom.getInstance("IBMSecureRandom"); - return; - } - catch(java.security.NoSuchAlgorithmException ee){ - //System.err.println(ee); - } - */ - } - public void fill(byte[] foo, int start, int len){ - /* - // This case will not become true in our usage. - if(start==0 && foo.length==len){ - random.nextBytes(foo); - return; - } - */ - if(len>tmp.length){ tmp=new byte[len]; } - random.nextBytes(tmp); - System.arraycopy(tmp, 0, foo, start, len); - } -}
  25. Download patch ChangeLog

    --- 0.1.42-2/ChangeLog 2009-07-14 02:32:06.000000000 +0000 +++ 0.1.48-0ubuntu1/ChangeLog 2012-04-23 16:12:30.000000000 +0000 @@ -1,6 +1,99 @@ ChangeLog of JSch ==================================================================== -Last modified: Tue Jul 14 02:29:29 UTC 2009 +Last modified: Fri Apr 20 06:44:50 UTC 2012 + + +Changes since version 0.1.47: +- change: the file transfer speed with ChannelSftp#get(String src) has been + improved; sending multiple requests at any one time. +- change: by the default, at most, 16 requests will be sent at any one time + in ChannelSftp. +- feature: added Session#{setIdentityRepository(),getIdentityRepository()} + + +Changes since version 0.1.46: +- bugfix: failed to initialize channels for the stream forwarding. FIXED +- change: Session#getHostKey() will return the given hostkey + even if session is not established. +- change: Logger will record additional messages about algorithm negotiations. +- feature: added ChannelSftp#ls(String path, LsEntrySelector selector) method. +- feature: added IdentityRepository#{getName(),getStatus()} methods. + + +Changes since version 0.1.45: +- bugfix: in the agent forwarding mode, "ssh-add -l" on the remote + will freeze. FIXED +- bugfix: requests should not be sent to the closed channel. FIXED +- bugfix: ChannelShell#setAgentForwarding(true) will cause + resource leaks. FIXED +- change: for the efficiency, channel opening will be delayed + in local port forwarding. +- change: added examples/Sudo.java to demonstrate sudo on exec channel. +- change: authentication trials will be failed at 6 failures by the default. +- change: updating copyright messages; 2011 -> 2012 +- feature: added JSch#setIdentityRepository(IdentityRepository irepo) to + integrate with jsch-agent-proxy. + + +Changes since version 0.1.44: +- bugfix: fields referred by multiple threads simultaneously should be + volatile. FIXED +- bugfix: use local window size offered by the remote in sftp put. + FIXED +- bugfix: SftpProgressMonitor#init was not invoked in sftp-put + for input-stream. FIXED +- bugfix: sftp protocol version 3, 4 and 5 should allow only + UTF-8 encoding. FIXED +- bugfix: Channel Subsystem had failed to set X forwarding flag. + FIXED +- bugfix: Channel X11 had leaked some resources. + FIXED +- bugfix: packet compression may break sessions + in some case(transferring deflated data). FIXED +- bugfix: failed to set dev-null for logger + FIXED +- bugfix: even in sftp protocol version 3 session, some sftpd sends data + packets defined in sftp protocol 6 ;-( working around it. FIXED +- bugfix: ChannelSftp file globbing logic had missed + the string "foo\\\*bar" as a pattern. FIXED +- bugfix: sequential accesses to ChannelSftp by multiple threads may + break its I/O channel. + https://bugs.eclipse.org/bugs/show_bug.cgi?id=359184 FIXED +- bugfix: KeyPair.load can not handle private keys cyphered with AES. FIXED +- change: to improve sftp-put performance, send multiple packet at one time. +- change: wait/notify will be used instead of sleep loop + in establishing channel connections. +- change: increasing local window size for sftp get. +- change: updating copyright messages; 2010 -> 2011 +- change: src/com -> src/main/java/com +- feature: key-exchange method "diffie-hellman-group14-sha1" + (RFC4253#section-8.2) +- feature: KeyPair#getPlulicKeyCommment() is added. + + +Changes since version 0.1.43: +- bugfix: hmac-md5-96 and hmac-sha1-96 are broken. FIXED. +- bugfix: working around OOME in parsing broken data from the remote. FIXED. +- bugfix: failed to send very long command for exec channels. FIXED. +- bugfix: in some case, failed to get the response + for remote port-forwarding request. FIXED. +- feature: support for private keys ciphered with aes192-cbc and aes128-cbc. + +