diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-07-24 12:50:48 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2014-07-24 12:50:48 -0400 |
commit | f0954415a54b0dc11040f815970d287e14e63309 (patch) | |
tree | d743d18cdacc8ee6abf54133bf9b376db148054d /rules | |
parent | b36352b641c3a477e950636a76e1aa10570174f1 (diff) |
sisu-inject-bootstrap: don't remove the beans package
Diffstat (limited to 'rules')
-rw-r--r-- | rules/sisu-inject-bootstrap/delete.list | 1 | ||||
-rw-r--r-- | rules/sisu-inject-bootstrap/no-guice-unstable.patch | 96 |
2 files changed, 96 insertions, 1 deletions
diff --git a/rules/sisu-inject-bootstrap/delete.list b/rules/sisu-inject-bootstrap/delete.list index 6b5f115..de9e211 100644 --- a/rules/sisu-inject-bootstrap/delete.list +++ b/rules/sisu-inject-bootstrap/delete.list @@ -1,2 +1 @@ org.eclipse.sisu.inject/src/org/eclipse/sisu/launch/InjectedTest.java -org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/ diff --git a/rules/sisu-inject-bootstrap/no-guice-unstable.patch b/rules/sisu-inject-bootstrap/no-guice-unstable.patch new file mode 100644 index 0000000..3c53b41 --- /dev/null +++ b/rules/sisu-inject-bootstrap/no-guice-unstable.patch @@ -0,0 +1,96 @@ +diff -ru sisu-inject-bootstrap.orig/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/BeanScheduler.java sisu-inject-bootstrap/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/BeanScheduler.java +--- sisu-inject-bootstrap.orig/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/BeanScheduler.java 2014-07-22 20:36:53.223380900 -0400 ++++ sisu-inject-bootstrap/org.eclipse.sisu.inject/src/org/eclipse/sisu/bean/BeanScheduler.java 2014-07-24 12:34:51.562456309 -0400 +@@ -29,23 +29,7 @@ + + static + { +- Object activator; +- try +- { +- // extra check in case we have both old and new versions of guice overlapping on the runtime classpath +- Binder.class.getMethod( "bindListener", Matcher.class, com.google.inject.spi.ProvisionListener[].class ); +- +- activator = new Activator(); +- } +- catch ( final Exception e ) +- { +- activator = null; +- } +- catch ( final LinkageError e ) +- { +- activator = null; +- } +- ACTIVATOR = activator; ++ ACTIVATOR = null; + } + + // ---------------------------------------------------------------------- +@@ -60,10 +44,6 @@ + { + public void configure( final Binder binder ) + { +- if ( null != ACTIVATOR ) +- { +- binder.bindListener( Matchers.any(), (com.google.inject.spi.ProvisionListener) ACTIVATOR ); +- } + } + }; + +@@ -84,21 +64,6 @@ + */ + public final void schedule( final Object bean ) + { +- if ( null != ACTIVATOR ) +- { +- final Object[] holder = getPendingHolder(); +- final Object pending = holder[0]; +- if ( pending == PLACEHOLDER ) +- { +- holder[0] = new Pending( bean ); +- return; // will be activated later +- } +- else if ( pending instanceof Pending ) +- { +- ( (Pending) pending ).add( bean ); +- return; // will be activated later +- } +- } + activate( bean ); // no ProvisionListener, so activate immediately + } + +@@ -157,34 +122,4 @@ + } + } + } +- +- /** +- * Listens to provisioning events in order to determine safe activation points. +- */ +- static final class Activator +- implements com.google.inject.spi.ProvisionListener +- { +- public <T> void onProvision( final ProvisionInvocation<T> pi ) +- { +- final Object[] holder = getPendingHolder(); +- if ( null == holder[0] ) +- { +- final Object pending; +- holder[0] = PLACEHOLDER; +- try +- { +- pi.provision(); // may involve nested calls/cycles +- } +- finally +- { +- pending = holder[0]; +- holder[0] = null; +- } +- if ( pending instanceof Pending ) +- { +- ( (Pending) pending ).activate(); +- } +- } +- } +- } + } |