[rhino] 05/09: Reintroduced removed methods in the FunctionNode and ObjectProperty classes

Emmanuel Bourg ebourg-guest at moszumanska.debian.org
Fri Jan 20 10:09:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

ebourg-guest pushed a commit to branch master
in repository rhino.

commit f8bca114542f7c692526bf422735a78e0ebadd96
Author: Emmanuel Bourg <ebourg at apache.org>
Date:   Fri Jan 20 01:16:49 2017 +0100

    Reintroduced removed methods in the FunctionNode and ObjectProperty classes
---
 debian/changelog                                   |  3 +
 .../06_preserve-backward-compatibility.patch       | 98 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 102 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 04069f4..6ac5422 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ rhino (1.7.7.1-1) UNRELEASED; urgency=medium
     - Require a Java 6 runtime or higher
     - Use the pom from the upstream sources to install the Maven artifacts,
       and relocate the old coordinates rhino:js to org.mozilla:rhino
+    - Reintroduced removed methods in the FunctionNode and ObjectProperty
+      classes to preserve the backward compatibility and fix build failures
+      in reverse dependencies.
   * Removed the transitional package rhino-doc
   * Updated the man pages (Closes: #792243)
   * Build with the DH sequencer instead of CDBS
diff --git a/debian/patches/06_preserve-backward-compatibility.patch b/debian/patches/06_preserve-backward-compatibility.patch
new file mode 100644
index 0000000..3061a72
--- /dev/null
+++ b/debian/patches/06_preserve-backward-compatibility.patch
@@ -0,0 +1,98 @@
+Description: Reintroduces removed methods to preserve the backward compatibility.
+ * Commit 9144b81 renamed isGetter/Setter methods, this breaks closure-compiler
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/src/org/mozilla/javascript/ast/ObjectProperty.java
++++ b/src/org/mozilla/javascript/ast/ObjectProperty.java
+@@ -69,6 +69,10 @@
+         type = Token.GET;
+     }
+ 
++    public void setIsGetter() {
++        setIsGetterMethod();
++    }
++
+     /**
+      * Returns true if this is a getter function.
+      */
+@@ -76,6 +80,10 @@
+         return type == Token.GET;
+     }
+ 
++    public boolean isGetter() {
++        return isGetterMethod();
++    }
++
+     /**
+      * Marks this node as a "setter" property.
+      */
+@@ -83,6 +91,10 @@
+         type = Token.SET;
+     }
+ 
++    public void setIsSetter() {
++        setIsSetterMethod();
++    }
++
+     /**
+      * Returns true if this is a setter function.
+      */
+@@ -90,6 +102,10 @@
+         return type == Token.SET;
+     }
+ 
++    public boolean isSetter() {
++        return isSetterMethod();
++    }
++
+     public void setIsNormalMethod() {
+         type = Token.METHOD;
+     }
+--- a/src/org/mozilla/javascript/ast/FunctionNode.java
++++ b/src/org/mozilla/javascript/ast/FunctionNode.java
+@@ -329,14 +329,26 @@
+         return functionForm == Form.GETTER || functionForm == Form.SETTER || functionForm == Form.METHOD;
+     }
+ 
++    public boolean isGetterOrSetter() {
++        return functionForm == Form.GETTER || functionForm == Form.SETTER;
++    }
++
+     public boolean isGetterMethod() {
+         return functionForm == Form.GETTER;
+     }
+ 
++    public boolean isGetter() {
++        return isGetterMethod();
++    }
++
+     public boolean isSetterMethod() {
+         return functionForm == Form.SETTER;
+     }
+ 
++    public boolean isSetter() {
++        return isSetterMethod();
++    }
++
+     public boolean isNormalMethod() {
+         return functionForm == Form.METHOD;
+     }
+@@ -345,10 +357,18 @@
+         functionForm = Form.GETTER;
+     }
+ 
++    public void setFunctionIsGetter() {
++        setFunctionIsGetterMethod();
++    }
++
+     public void setFunctionIsSetterMethod() {
+         functionForm = Form.SETTER;
+     }
+ 
++    public void setFunctionIsSetter() {
++        setFunctionIsSetterMethod();
++    }
++
+     public void setFunctionIsNormalMethod() {
+         functionForm = Form.METHOD;
+     }
diff --git a/debian/patches/series b/debian/patches/series
index 93343f5..6552ab8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 02_exclude-jdk15.patch
 03_public_getSourcePositionFromStack.patch
 05_modify-usage.patch
+06_preserve-backward-compatibility.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/rhino.git



More information about the pkg-java-commits mailing list