[mojarra] 02/03: Add 01_disable_jsf_impl_provider_code.patch

Miguel Landaeta nomadium at moszumanska.debian.org
Tue Sep 30 18:45:17 UTC 2014


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

nomadium pushed a commit to branch experimental
in repository mojarra.

commit 2e4e6108cb03165f621ea0fa51534904c2a70ebf
Author: Miguel Landaeta <nomadium at debian.org>
Date:   Tue Sep 30 15:18:30 2014 -0300

    Add 01_disable_jsf_impl_provider_code.patch
---
 .../01_disable_jsf_impl_provider_code.patch        | 106 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 107 insertions(+)

diff --git a/debian/patches/01_disable_jsf_impl_provider_code.patch b/debian/patches/01_disable_jsf_impl_provider_code.patch
new file mode 100644
index 0000000..9f0cfa9
--- /dev/null
+++ b/debian/patches/01_disable_jsf_impl_provider_code.patch
@@ -0,0 +1,106 @@
+Description: Disable references to com.sun.faces.spi.InjectionProvider class in API code
+ As indicated in README.Debian this package is not shipping jsf-impl jar yet and I found
+ a class in jsf-api jar that is depending on that specific implementation.
+ I consider this a bug and beside that, I had to disable that code, otherwise jsf-api
+ can't compile.
+Author: Miguel Landaeta <nomadium at debian.org>
+Forwarded: no
+Last-Update: 2014-09-30
+
+--- mojarra-2.2.8.orig/javax/faces/FactoryFinder.java
++++ mojarra-2.2.8/javax/faces/FactoryFinder.java
+@@ -41,7 +41,7 @@
+ package javax.faces;
+ 
+ 
+-import com.sun.faces.spi.InjectionProvider;
++//import com.sun.faces.spi.InjectionProvider;
+ import java.io.BufferedReader;
+ import java.io.InputStream;
+ import java.io.InputStreamReader;
+@@ -431,6 +431,7 @@ public final class FactoryFinder {
+         if (!FACTORIES_CACHE.applicationMap.isEmpty()) {
+         
+             FactoryManager fm = FACTORIES_CACHE.getApplicationFactoryManager(cl);
++            /*
+             InjectionProvider provider = fm.getInjectionProvider();
+             if (null != provider) {
+                 Collection factories = null;
+@@ -450,10 +451,11 @@ public final class FactoryFinder {
+                     }
+                 }
+             } else {
++            */
+                 if (LOGGER.isLoggable(Level.SEVERE)) {
+                     LOGGER.log(Level.SEVERE, "Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?");
+                 }
+-            }
++            //}
+         }
+ 
+         FACTORIES_CACHE.removeApplicationFactoryManager(cl);
+@@ -676,7 +678,7 @@ public final class FactoryFinder {
+         Object[] newInstanceArgs = new Object[1];
+         Constructor ctor;
+         Object result = null;
+-        InjectionProvider provider = null;
++        //InjectionProvider provider = null;
+ 
+         // if we have a previousImpl and the appropriate one arg ctor.
+         if ((null != previousImpl) &&
+@@ -690,15 +692,17 @@ public final class FactoryFinder {
+                 result = ctor.newInstance(newInstanceArgs);
+                 
+                 FactoryManager fm = FACTORIES_CACHE.getApplicationFactoryManager(classLoader);
++                /*
+                 provider = fm.getInjectionProvider();
+                 if (null != provider) {
+                     provider.inject(result);
+                     provider.invokePostConstruct(result);
+                 } else {
++                */
+                     if (LOGGER.isLoggable(Level.SEVERE)) {
+                         LOGGER.log(Level.SEVERE, "Unable to inject {0} because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?", result);
+                     }
+-                }
++                //}
+                 
+                 
+             }
+@@ -1045,8 +1049,9 @@ public final class FactoryFinder {
+         }
+         
+         private void copyInjectionProviderFromFacesContext() {
+-            InjectionProvider injectionProvider = null;
++            //InjectionProvider injectionProvider = null;
+             FacesContext context = FacesContext.getCurrentInstance();
++            /*
+             if (null != context) {
+                 injectionProvider = (InjectionProvider) context.getAttributes().get("com.sun.faces.config.ConfigManager_INJECTION_PROVIDER_TASK");
+             } 
+@@ -1054,10 +1059,11 @@ public final class FactoryFinder {
+             if (null != injectionProvider) {
+                 factories.put(INJECTION_PROVIDER_KEY, injectionProvider);
+             } else {
++            */
+                 if (LOGGER.isLoggable(Level.SEVERE)) {
+                     LOGGER.log(Level.SEVERE, "Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?");
+                 }
+-            }
++            //}
+         
+         }
+ 
+@@ -1084,10 +1090,12 @@ public final class FactoryFinder {
+             }
+         }
+ 
++        /*
+         InjectionProvider getInjectionProvider() {
+             InjectionProvider result = (InjectionProvider) factories.get(INJECTION_PROVIDER_KEY);
+             return result;
+         }
++        */
+         
+         void clearInjectionProvider() {
+             factories.remove(INJECTION_PROVIDER_KEY);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..742c5b5
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01_disable_jsf_impl_provider_code.patch

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



More information about the pkg-java-commits mailing list