Age | Commit message (Collapse) | Author |
|
time w/o using Sets.newConcurrentHashSet.,
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=85377786
|
|
bindings and have those methods bound as Providers to specialized Keys.
This is the basis of what will be used to allow
Multibinder/MapBinder/OptionalBinder to have stuff like @SetProvides,
@MapProvides, @OptionalProvides and dagger interop support.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=85361820
|
|
following:
* Fixes @Provides injection so that parameters are checked for nullability.
By default this will error. The flag is named:
guice_check_nullable_provides_params and can be set to ERROR, WARNING or IGNORE.
* Adds InjectionPoint.forMethod to build an InjectionPoint off an arbitrary
method.
* Adds Binder.getProvider(Dependency) to a get a Provider for a given
dependency (with all its nullability & injection points maintained).
* Update ProviderLookup to accept a Dependency in addition to a Key.
This is in preparation for two things:
1) Allowing multibindings/mapbindings/optionalbindings to be specified as
annotations on methods in a module.
2) Adding a dagger compatibility module.
... the general idea will be that I'll also add a hook into
ProvidesMethodModule somehow to look at arbitrary other annotations and let
folks process them specially.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=85353820
|
|
types annotated with @Component. This allows one to provide Dagger Components with Guice Injectors.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=84836495
|
|
No functional changes.
This will allow android apps to remove this method
via proguard in release mode.
For everything else, it should be almost a no-op, just one extra
indirection.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=83477074
|
|
The old behavior was to try to create the binding in the parent,
swallow the error, and create it in the child. This restores that
behavior, as bindings created in the current injector shouldn't be
prohibited.
|
|
|
|
When Binder.requireExplicitBindings() is in effect, don't allow any
JIT bindings to be created in parent injectors, even JIT bindings that
are normally exempt such as the targets of linked key bindings.
|
|
half-initialized objects leak out to ProvisionListeners. Throw
ProvisionException if there's any new errors during provision.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81455693
|
|
|
|
Since calling System.getProperty may throw an exception on locked-down systems.
Note: this patch has the side-effect of making the 'guice_include_stack_traces'
setting static, rather than querying the system property each time a module is
installed. Making the setting static improves performance as System.getProperty
can be a bottleneck, at the cost of being able to change the setting
on-the-fly.
(This is a slightly modified version of the pull request from #872.)
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=79427020
|
|
Singleton is defined as a scope which creates no more than one
object per injector. It's highly confusing when you catch a deadlock
between two unrelated injectors due to the same class injection.
Problem is demonstrated using a test that recreates scenario when
one thread injecting class can block other thread to use its own
injector.
Proposed solution is to use Injector-wide locks in a singleton.
ThreadLocal as a way to store current state.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=78469951
|
|
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=75815862
|
|
Key<Logger> for every parameter. Instead use a constant.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=75227883
|
|
|
|
|
|
Instead of relying on Guice binding deduplication (and hacking up RealElement
to break the annotation contract to do so, causing weirdness in WeakKeySet &
forcing us to care about "rehashing keys"), we instead deduplicate within
Multibinder. The downside of this is that toInstance or toProvider(instance)
bindings that are deduplicated will remain in the object graph but effectively
be unreachable. However, that's a downside I'm willing to live with to remove
this hack.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72570932
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72545394
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=72100195
|
|
methods for gin. If we are, skip fast class generation.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=71452336
|
|
1) Stop using doclava. It has too many bugs (like dropping annotations).
2) Tell javadoc not to doclint. Java8 does it and errs if it fails.
3) Link to appropriate third parties from javadoc.
4) Split extensions into separate groups in ant javadoc.
5) Cleanup code that had javadoc warnings.
|
|
Overriding an @Provides method is fairly rare and can be very confusing (e.g. a covariant override). This will not be backwards compatible for open source users.
See: https://groups.google.com/d/msg/google-guice/bRo5SvmzpdI/_uIfF3yUy9gJ for the public discussion
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=70120926
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69390543
|
|
https://github.com/sonatype/sisu-guice/blob/master/PATCHES/GUICE_288_decouple_thread_local.patch.
This rearranges the furniture a bit so we can track down some strange allocations in ThreadLocal#get().
Thanks, Stuart!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69169927
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=67854418
|
|
Here is a caliper benchmark to demonstrate the difference.
https://caliper.googleplex.com/runs/2d349fec-2742-45e1-b6e5-16997c522387#r:scenario.benchmarkSpec.methodName,scenario.benchmarkSpec.parameters.strategy
This should save about 200-300 ns per method invocation and about 224 bytes (over 4 objects) of allocations for each invocation.
The cost of this (of course) is greater permgen usage and potentially slower startup/injector creation due to the class generation.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=66364901
|
|
injected. This broke injections for different reasons before & after java8, but the fix is the same for both.
Add a test with method injection points & super/sub classes that change method visibility, to confirm that synthesized/bridged methods don't artificially change what's injected or the parameters of the injections.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=66136797
|
|
caused misdiagnosis, as users think "There was a Guice error" when there is an error in user code.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=66120881
|
|
backingMap key a concrete type.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=65307015
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=65072672
|
|
doesn't seem to be any reason *not* to provide these methods, and it means downstream code that does
bind(X.class).toProvider(Providers.of(null))
does not result in erroneous duplicate binding errors if Modules.override is used.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=65067530
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=64831090
|
|
update opensource build to ASM 5.0.1.
I'm not confident this will 100% solve every issue... we may need to update cglib also to use OpCodes.ASM5. Should do some testing w/ AOP over things with default methods & lambdas.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=64557004
|
|
a strict rollback of the rollback - I've added protection against the NPE that would happen if there's a GC between the isBlacklisted call and the getSources call.
*** Original change description ***
Enhance WeakKeySet to auto evict keys and avoid calling toString on Keys.
This should fix https://code.google.com/p/google-guice/issues/detail?id=756.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=64507759
|
|
Causes an internal test to become flaky.
*** Original change description ***
Enhance WeakKeySet to auto evict keys and avoid calling toString on Keys.
This should fix https://code.google.com/p/google-guice/issues/detail?id=756.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=64181193
|
|
This should fix https://code.google.com/p/google-guice/issues/detail?id=756.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=64083354
|
|
from different MapBinders are distinct, and also fixes ProviderLookup's Provider so it exposes its dependency, which allows MapBinder to properly find its dependencies.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=63811558
|
|
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=63557612
|
|
do more analysis (with the enclosing instance, method, etc..).
Notably, this can let users write analysis that looks for @Provides methods
declared with @Nullable, and compare against injection points w/o @Nullable,
failing if so.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=62834918
|
|
in addition to the Guice Provider. This is an incompatible change for people who extend LinkedBindingBuilder, but not for people who use it.
This will allow people to switch to JSR330 types more easily.
LinkedBindingBuilder needs both toProvider(Provider) and toProvider(javax.inject.Provider) because precompiled jars (e.g, stuff in third_party, maven, etc..) that used toProvider(Provider) would otherwise throw a NoSuchMethodError.
I left the getProviderInstance method on ProviderInstanceBinding, otherwise
that would require anyone using the SPI method to change their code to accept
the weaker type.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=61966924
|
|
later from a
different context. Patch by Tavian Barnes, thanks Tavian!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=58040591
|
|
it can have multiple sources. The Message objects is returned from two public methods(Elements#getElements() and Errors#getMessages()) that make any changes in its method declarations difficult. As the first step, I am going to remove all calls to the Message constructor that receives multiple sources from []. So, the only calls will be from Errors that I will deal with separately.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57979416
|
|
Description in the bug describes this best:
TypeConverterBindingProcessor has two responsibilities: 1) prepare built-in type
converters for primitives, enums, classes, etc. and 2) process TypeConverter
bindings and register them with the containing injector.
The first responsibility only needs the injector reference, it doesn't need
access to the processor's Errors cache. However, the current implementation
runs in the context of the processor and creates a number of anonymous classes,
and they all contain an implicit reference (this$0) back to the processor. This
can lead to some Errors instances being kept alive longer than necessary by
these anonymous classes, but not a large number.
Changing the prepareBuiltInConverters implementation over to use static methods
that pass the injector as an argument fixes this problem by removing the
implicit reference to the processor, since the anonymous classes are now
created from a static context.
Patch by Stuart McCulloch. Thanks Stuart!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57906347
|
|
*** Original change description ***
Pass the correct stage to Modules.override, so currentStage() works.
Fixes issue 784 -- patch thanks to Tavian Barnes.
***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57809778
|
|
modified patch from Tavian Barnes, thanks Tavian!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57798796
|
|
*** Original change description ***
Pass the correct stage to Modules.override, so currentStage() works.
Fixes issue 784 -- patch thanks to Tavian Barnes.
***
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57770628
|
|
listeners. Patch provided by Stuart McCulloch, thanks!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57764090
|
|
Fixes issue 776, patch thanks to Stuart McCulloch!
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57757534
|
|
Fixes issue 784 -- patch thanks to Tavian Barnes.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=57755697
|