rpms/rhino/devel rhino-457336.diff, NONE, 1.1 .cvsignore, 1.3, 1.4 rhino.script, 1.1, 1.2 rhino.spec, 1.7, 1.8 sources, 1.4, 1.5

Toshio くらとみ toshio at fedoraproject.org
Mon Jun 1 17:34:58 UTC 2009


Author: toshio

Update of /cvs/pkgs/rpms/rhino/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17689

Modified Files:
	.cvsignore rhino.script rhino.spec sources 
Added Files:
	rhino-457336.diff 
Log Message:

* Sun May 31 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0:1.7-0.6.r2
- Update to rhino1_7R2
- Add patch from Steven Elliott to fix exception in the interpreter shell.


rhino-457336.diff:

--- NEW FILE rhino-457336.diff ---
This patch attempts to fix a null pointer exception in Rhino when Rhino's 
attempt to dynamically load the jline library fails.  See Red Hat Bugzilla 
bug #457336:
    https://bugzilla.redhat.com/show_bug.cgi?id=457336

This patch is subject to the Rhino License:
    https://developer.mozilla.org/en/Rhino_License

This patch can be applied with:
    patch -p 0 < rhino-457336.diff
Please send comments and questions to:
    selliott4 at austin.rr.com

--- toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java.orig	2009-05-30 18:59:58.000000000 -0500
+++ toolsrc/org/mozilla/javascript/tools/shell/ShellLine.java	2009-05-30 21:17:10.000000000 -0500
@@ -62,6 +62,16 @@
         // We don't want a compile-time dependency on the JLine jar, so use
         // reflection to load and reference the JLine classes.
         ClassLoader classLoader = ShellLine.class.getClassLoader();
+        if (classLoader == null) {
+            // If the attempt to get a class specific class loader above failed
+            // then fallback to the system class loader.
+            classLoader = ClassLoader.getSystemClassLoader();
+        }
+        if (classLoader == null) {
+            // If for some reason we still don't have a handle to a class
+            // loader then give up (avoid a NullPointerException).
+            return null;
+        }
         Class<?> readerClass = Kit.classOrNull(classLoader, "jline.ConsoleReader");
         if (readerClass == null)
             return null;


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/rhino/devel/.cvsignore,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- .cvsignore	13 Feb 2009 19:44:40 -0000	1.3
+++ .cvsignore	1 Jun 2009 17:34:28 -0000	1.4
@@ -1 +1 @@
-rhino1_7R2pre.zip
+rhino1_7R2.zip


Index: rhino.script
===================================================================
RCS file: /cvs/pkgs/rpms/rhino/devel/rhino.script,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- rhino.script	13 Mar 2007 23:05:54 -0000	1.1
+++ rhino.script	1 Jun 2009 17:34:28 -0000	1.2
@@ -18,7 +18,9 @@ fi
 
 # Configuration
 MAIN_CLASS=org.mozilla.javascript.tools.shell.Main
-BASE_JARS="rhino xmlbeans/xbean"
+# Remove xmlbeans until we have it in Fedora
+#BASE_JARS="rhino jline xmlbeans/xbean"
+BASE_JARS="rhino jline"
 
 # Set parameters
 set_jvm


Index: rhino.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rhino/devel/rhino.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- rhino.spec	20 Apr 2009 15:40:50 -0000	1.7
+++ rhino.spec	1 Jun 2009 17:34:28 -0000	1.8
@@ -28,11 +28,11 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #
 
-%define cvs_version 1_7R2pre
+%define cvs_version 1_7R2
 
 Name:           rhino
 Version:        1.7
-Release:        0.4.r2pre.1.1%{?dist}
+Release:        0.6.r2%{?dist}
 Epoch:          0
 Summary:        JavaScript for Java
 License:        MPLv1.1 or GPLv2+
@@ -42,14 +42,17 @@ Source0:        ftp://ftp.mozilla.org/pu
 Source2:        %{name}.script
 
 Patch0:         %{name}-build.patch
+# Patch to try several methods of loading jline library or fail gracefully
+Patch1:         %{name}-457336.diff
 URL:            http://www.mozilla.org/rhino/
 Group:          Development/Libraries/Java
 
 BuildRequires:  ant
 BuildRequires:  bea-stax-api
 BuildRequires:  java-1.6.0-openjdk-devel >= 1:1.6.0.0
-Requires:	jpackage-utils
-        
+Requires:       jpackage-utils
+Requires:       jline
+
 # Disable xmlbeans until we can get it into Fedora
 #Requires:       xmlbeans
 #BuildRequires:  xmlbeans
@@ -86,6 +89,7 @@ Javadoc for %{name}.
 %prep
 %setup -q -n %{name}%{cvs_version}
 %patch0 -p1
+%patch1 -p0 -b .jline
 
 # Fix build
 %{__perl} -pi -e 's|.*<get.*src=.*>\n||' build.xml testsrc/build.xml toolsrc/org/mozilla/javascript/tools/debugger/build.xml xmlimplsrc/build.xml
@@ -158,6 +162,10 @@ popd
 %doc %{_javadocdir}/*
 
 %changelog
+* Sun May 31 2009 Toshio Kuratomi <toshio at fedoraproject.org> - 0:1.7-0.6.r2
+- Update to rhino1_7R2
+- Add patch from Steven Elliott to fix exception in the interpreter shell.
+
 * Mon Apr 20 2009 Lillian Angel <langel at redhat.com> - 0:1.7-0.4.r2pre.1.1
 - Added jpackage-utils requirement.
 - Resolves: rhbz#496435


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/rhino/devel/sources,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- sources	13 Feb 2009 19:46:00 -0000	1.4
+++ sources	1 Jun 2009 17:34:28 -0000	1.5
@@ -1 +1 @@
-d891a156695f1f51450899424a3ca0dc  rhino1_7R2pre.zip
+40d0a9abec8169e42920214b37fa8e0e  rhino1_7R2.zip




More information about the fedora-extras-commits mailing list