Commit Graph
20 Commits
Author SHA1 Message Date
Guice TeamandGuice Team 80b91afae2 Update tests to support running with Java 15.
In Java 15, the annotation `toString` implementation omits the member name.

PiperOrigin-RevId: 338746927
2020-10-23 14:37:28 -07:00
Guice TeamandGuice Team 5caa549395 Enable the new Guice error messages.
Changes include:

 - update Guice tests that asserts error messages
 - export new errors tests
 - update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests

PiperOrigin-RevId: 337602195
2020-10-16 16:55:03 -07:00
Guice TeamandGuice Team 9a8e46716e Revert previous change because it broke some tests when running with openjdk8.
PiperOrigin-RevId: 337517262
2020-10-16 09:13:55 -07:00
Guice TeamandGuice Team 2c8c7fed12 Enable the new Guice error messages.
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests

PiperOrigin-RevId: 337401912
2020-10-15 16:06:22 -07:00
Guice TeamandGuice Team dd873be400 Remove AOP build variant.
Changes include:

- skip tests that are testing bytecode generation enabled behaviors
- make line number and source file name information available even when bytecode generation is disabled since it does not use bytecode generation and makes testing easier (some tests rely on the information being available)
- update maven pom files to stop producing a no-aop version of Guice
- added test profile to execute tests with bytecode generation disabled

PiperOrigin-RevId: 336306344
2020-10-09 09:23:54 -07:00
Guice TeamandGuice Team b7cadc1cfa Migrate several tests to junit4 so that tests that rely on AOP can be skipped using Assume.assumeTrue.
PiperOrigin-RevId: 335755255
2020-10-06 17:18:53 -07:00
xiaomingjiaandKurt Alfred Kluever db66b74249 Fix some unchecked and rawtypes warnings in Guice code.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=324662892
2020-08-04 11:22:03 -04:00
diamondmandDavid P. Baker c1225dcf8f Change the error message for missingConstructor() to be more similar to missingImplementation() (which is far more often the actual issue).
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=263249646
2019-08-15 14:38:41 -04:00
dpbandRon Shapiro 13ca52bc3b Support Java 9.
Don't assume classloaders are URLClassLoaders. Parse the java.class.path property for URLs if not.
In Java 9, annotations with string values quote them. Make tests and implementations match that behavior.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=170488154
2018-01-25 11:12:58 -05:00
lukesandRon Shapiro dcf7bdacc2 remove unnecessary explicit type parameters now that we are on java7
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=145716288
2017-03-21 15:28:23 -04:00
lukesandSam Berlin 713c06cce9 Fix issues reported by errorprone
99% of this is adding missing @Override annotations, in the long tail we also have

* insert missing calls to Assert.fail() in tests that are testing exception behavior
* rewrite a few cases of Foo.class.instanceof(c) to c instanceof Foo
* rewrite Class.newInstance - > Class.getConstructor().newInstance() which doesn't break checked exception checking.
* adding @javax.inject.Inject annotations to methods that override methods annotated with @javax.inject.Inject

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131839622
2016-09-07 17:45:54 -04:00
mackrazandSam Berlin 2b12d5cc63 Changed suppress warnings message to suppress Guice annotation processor error that is caused by multiple constructors annotated with @Inject to make it more clear/specific.
"inject-constructors" -> "InjectMultipleAtInjectConstructors"
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=130007929
2016-08-29 16:41:31 -04:00
mackrazandSam Berlin 2bbf0a3995 This CL adds @SuppressWarnings("inject-constructors") to classes that have multiple injectable constructors.
Reasoning:
I am rolling out an Annotation Processor check that fails at compile-time if you have multiple injectable constructors for a single class as this is not supported by Guice.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=128986989
2016-08-29 16:39:55 -04:00
cssandSam Berlin 036e9a8276 Enable better guice error messages for a missing binding.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=125479432
2016-08-29 16:39:11 -04:00
Sam Berlin c00df28be8 Automated code cleanups by internal tool.
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=69390543
2014-07-01 17:06:55 -04:00
Christian Edward Gruber bf2b16c06a Add support for ProvisionListeners to notify on toInstance & constant bindings.
---------------------
Manually synced.
COMMIT=41634417
2013-05-15 18:49:18 -07:00
sberlin b7a02b02d8 * Remove unused imports
* Sort imports
* Convert tabs to spaces
* Fix the ant no_aop build


Revision created by MOE tool push_codebase.
MOE_MIGRATION=2532


git-svn-id: https://google-guice.googlecode.com/svn/trunk@1572 d779f126-a31b-0410-b53b-1d3aecad763e
2011-07-08 00:34:16 +00:00
sberlin d9c913acca switch Guice from manually repackaging Guava to depending on Guava. it's still jarjar'd right now, which is causing a ~400k increase in guice-snapshot.jar. next step is to switch to ProGuard to remove the unnecessary code and cut it back down (even further?!). this will let people build from Guice source and depend directly on Guava code without having to worry about hiding internal/util.
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1558 d779f126-a31b-0410-b53b-1d3aecad763e
2011-06-26 21:02:54 +00:00
mcculls ac4cdbe137 Issue 561: fix no_aop build by munging away all aop-related references
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1304 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-21 22:05:58 +00:00
mcculls 74d714c1e7 Issue 552: (step 1) move core code to its own subdirectory
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1300 d779f126-a31b-0410-b53b-1d3aecad763e
2010-10-21 19:10:16 +00:00