Commit Graph
1932 Commits
Author SHA1 Message Date
Guice TeamandGuice Team 1dbfbce488 Explain why ErrorsException is ignored in createJustInTimeBindingRecursive internal method.
PiperOrigin-RevId: 373157192
2021-05-11 08:33:09 -07:00
Guice TeamandGuice Team e960b66d3d Handle kotlin object declaration with permit annotations.
If the permit annotation is placed before the object keyword then the annotation will be present on the anonymous class. So this change update BoundFieldModule.WithPermits to also check annotations on the anonymous class itself.

PiperOrigin-RevId: 367707010
2021-04-09 14:42:59 -07:00
Guice TeamandGuice Team 053d0a5f29 Update workflow to cancel previous runs and upgrade to setup-java@v2.
PiperOrigin-RevId: 367692521
2021-04-09 13:23:53 -07:00
Guice TeamandGuice Team 6fc8ad454a no visible change.
PiperOrigin-RevId: 367246328
2021-04-07 10:25:08 -07:00
Sam BerlinandGuice Team a260458b28 Rework MapBinder to avoid a linked binding for the Map<K, ? extends V> binding to reduce noise in the graph.
PiperOrigin-RevId: 366251178
2021-04-01 07:59:57 -07:00
Sam BerlinandGuice Team e6ec2a4a94 Rework the way we bind the Set<? extends T> multibound object so that we can avoid the linked binding. This removes one unnecessary dependency from the graph, making graph visualizations more straight forward.
PiperOrigin-RevId: 366250039
2021-04-01 07:51:04 -07:00
Guice TeamandGuice Team dc7f4858f9 Support TYPE_USE type Nullable annotations.
This change only add support for top level annotation like `@Nullable List<String>` and not `List<@Nullable String>`.

PiperOrigin-RevId: 361592529
2021-03-08 10:00:47 -08:00
Guice TeamandGuice Team 27ae45775c Add a script to diff release jars with new release to do a quick check before approving the new release in maven central.
PiperOrigin-RevId: 360546122
2021-03-02 16:54:50 -08:00
Guice TeamandGuice Team 54cccd3406 bump snapshot version, update README & prior API xml
PiperOrigin-RevId: 360302867
2021-03-01 16:23:20 -08:00
Guice TeamandGuice Team e09d1eebd0 Add back build.properties files that were still used.
PiperOrigin-RevId: 359826559
2021-02-26 13:28:21 -08:00
Guice TeamandGuice Team 2872237b01 Throw an error if there is no MapKey annotation on @IntoMap dagger provider methods.
PiperOrigin-RevId: 359792774
2021-02-26 10:53:57 -08:00
Guice TeamandGuice Team 9dc98cb7c7 Add a test to verify that failure in scanning one key doesn't effect other bindings that depends on the key.
PiperOrigin-RevId: 359786415
2021-02-26 10:25:14 -08:00
boris-unckelandGuice Team 420400684c Upgrad guava to latest release 30.1-jre.
Closes #1472

PiperOrigin-RevId: 359383637
2021-02-24 15:28:44 -08:00
Matthias KurzandGuice Team 4a66eb4dec Upgrade asm from 9.0 to version 9.1
Closes #1487

PiperOrigin-RevId: 359373325
2021-02-24 14:39:50 -08:00
Guice TeamandGuice Team 6fa83e476a Add missing @since methods
PiperOrigin-RevId: 359326331
2021-02-24 11:11:23 -08:00
Guice TeamandGuice Team 96e835f098 Update @since tags
PiperOrigin-RevId: 359195197
2021-02-23 20:12:19 -08:00
Sam BerlinandXiaoming Jia bfc2e48f4a If all reasonable sources are filtered via skipSource, then show the source as "unknown source" instead of InjectorShell.build (which should be an internal detail).
PiperOrigin-RevId: 358853443
2021-02-22 13:50:35 -08:00
Guice TeamandGuice Team df622abf7c Fixing javadoc, map bindings were actually implemented some time ago
PiperOrigin-RevId: 356987382
2021-02-11 09:08:19 -08:00
Guice TeamandGuice Team 826a97fced Update the description for Key class.
PiperOrigin-RevId: 356859347
2021-02-10 16:51:38 -08:00
Guice TeamandGuice Team 015ed75b5c Restore the default method log message to WARNING level.
The test failures due to unexpected log messages are now resolved.

PiperOrigin-RevId: 355880552
2021-02-05 10:39:38 -08:00
Guice TeamandGuice Team f78f7cfb3b Temporarily down grade the warning to INFO level.
The warning is causing some test failures due to unexpected log messages.

PiperOrigin-RevId: 355507369
2021-02-03 16:25:41 -08:00
Stuart McCullochandGuice Team 9a83236e2f Fixes the way AssistedInject deals with default methods that javac generates.
Gory details:
  javac sometimes generates default methods for factories.
  We can't proxy them directly because the return type is different, and AssistedInject cares about the return type (to know what class to inject), so we must execute the default method as-is and let java route it.
  Calling the actual default method requires using MethodHandles, but if the factory isn't public the MethodHandles.lookups() that Guice constructs won't be able to see it.
  Previously, we used reflection to hack the ability to use ALL_MODES in Lookups, but that's bad and triggers a reflective access warning in newer JDKs.
  We now properly use findSpecial or unreflectSpecial on a user-provided Lookups.
  The user only needs to provide the Lookups if the factory is non-public. If they don't, we continue to fallback to hacky methods that may stop working at any time (and we log a warning).

Also adds a new test in a subpackage to guarantee that we trigger this (b/c code in the same package won't care about Lookups access issues).

Note: this is a modified version of mcculls' PR @  https://github.com/google/guice/pull/1448.

Closes https://github.com/google/guice/pull/1448
Closes https://github.com/google/guice/issues/1321

PiperOrigin-RevId: 355485022
2021-02-03 14:38:02 -08:00
Guice TeamandGuice Team e292838c89 Add a CI status badge.
PiperOrigin-RevId: 354580188
2021-01-29 11:57:18 -08:00
Guice TeamandGuice Team a26bb0100b Update workflow to cache maven packages.
PiperOrigin-RevId: 354555203
2021-01-29 10:06:13 -08:00
Guice TeamandGuice Team 62276f87be Configure github actions to publish latest javadoc and snapshot after a success test run.
PiperOrigin-RevId: 354360420
2021-01-28 11:51:21 -08:00
Guice TeamandXiaoming Jia 345316ace8 Initial setup for migrating from Travis to Github Actions.
Closes #1456

ORIGINAL_AUTHOR=Carl Dea <carl.dea@gmail.com>
PiperOrigin-RevId: 353906843
2021-01-26 15:02:06 -08:00
Guice TeamandGuice Team 2157fa9f12 revert support for TYPE_USE Nullable annotation.
PiperOrigin-RevId: 353872238
2021-01-26 08:29:20 -08:00
Sam BerlinandGuice Team 1a299822f0 Use respectful terms.
PiperOrigin-RevId: 353310819
2021-01-22 13:44:44 -08:00
Guice TeamandGuice Team 1a410a8bef Support TYPE_USE type Nullable annotations.
This change only add support for top level annotation like `@Nullable List<String>` and not `List<@Nullable String>`.

PiperOrigin-RevId: 353053953
2021-01-21 10:52:18 -08:00
Guice TeamandGuice Team a81072df06 Add an error when an injected constructor parameter's binding annotation's @Target does not include AnnotationTarget.PARAMETER.
PiperOrigin-RevId: 351170781
2021-01-11 09:33:42 -08:00
Guice TeamandGuice Team 5ea05c3ede Handle binding and injecting nullable kotlin properties.
PiperOrigin-RevId: 350666094
2021-01-07 17:02:53 -08:00
Guice TeamandGuice Team fdfc81cde4 Refactor conditional support for Kotlin features.
PiperOrigin-RevId: 350358874
2021-01-06 08:36:48 -08:00
Guice TeamandGuice Team dc5a782524 Add support for reading annotations on Kotlin properties.
PiperOrigin-RevId: 347864065
2020-12-16 11:40:52 -08:00
Sam BerlinandGuice Team fd4ef5e6a3 Rewrite DeclaredMembers to use stream ordering, so evaluation of subsequent comparators is lazy.
PiperOrigin-RevId: 347713768
2020-12-15 16:14:02 -08:00
Guice TeamandGuice Team 15ce8eb669 Avoid defensive clone() in ParameterizedType.getActualTypeArguments() when possible.
PiperOrigin-RevId: 347701829
2020-12-15 15:12:54 -08:00
Guice TeamandGuice Team 363f568b6d Fix quadratic behavior of AbstractProcessor.process() observed in profiles.
The received lists are always ArrayList, for which removing items one-by-one
from the left is inefficient.

This changes the behavior on exception.  Unlike std::remove_if,
ArrayList.removeIf() buffers all filter results before shifting any elements.

PiperOrigin-RevId: 347469725
2020-12-14 14:27:57 -08:00
Guice TeamandGuice Team 2712230640 Fix formatting of source with module stack. Add NullInjectedIntoNonNullable tests.
PiperOrigin-RevId: 346890324
2020-12-10 16:30:51 -08:00
Guice TeamandGuice Team e399b21ab8 Split generate-latest-docs.sh script into two script: one generates the docs and one generates and publishes them.
This will allow us to generate the released version of the api docs as  part of release process.

PiperOrigin-RevId: 345773223
2020-12-04 15:50:59 -08:00
Guice TeamandGuice Team ed6993aa14 Delete ant related build files.
PiperOrigin-RevId: 345749534
2020-12-04 13:51:03 -08:00
Guice TeamandGuice Team 79660ea0f5 Update github access token used for publishing api docs.
PiperOrigin-RevId: 345726340
2020-12-04 11:57:27 -08:00
Guice TeamandGuice Team 4b4b9a6fa8 Run mvn install to install snapshot artifact before running jdiff.
PiperOrigin-RevId: 345714487
2020-12-04 11:05:55 -08:00
Guice TeamandGuice Team 9c7fe49c7a Fix bash script for publishing latest api docs.
Using `/bin/sh` cause an "unexpected operator" so remove it.

PiperOrigin-RevId: 345708574
2020-12-04 10:40:30 -08:00
Guice TeamandGuice Team 07d13be147 Change to use jdiff maven plugin to generate API diffs.
The plugin is configured to diff the current version against last released version of the API.

Unlike the jdiff task run by ant, this plugin generates diff on a per module basis. So the script used to generate latest docs is updated to copy over per module API diffs into a single directory with a index page that links to each module's diffs.

Also fixed travis CI config to remove the docs configuration since the javadoc
and api diffs are now generated using maven.

PiperOrigin-RevId: 345697612
2020-12-04 09:52:37 -08:00
Guice TeamandGuice Team a795fcc1b8 Clarify wording of the MissingConstructor Guice error message
PiperOrigin-RevId: 345502715
2020-12-03 11:57:18 -08:00
Guice TeamandGuice Team 413d0d5dba Configure maven-javadoc-plugin to group modules into separate tabs.
PiperOrigin-RevId: 345329769
2020-12-02 15:51:57 -08:00
Guice TeamandGuice Team 70062306db Update BoundFieldModule description to be more specific about what it does.
PiperOrigin-RevId: 345252174
2020-12-02 09:49:56 -08:00
Guice TeamandGuice Team 338d0039c1 Add documentation for AbstractBindingBuilder.
PiperOrigin-RevId: 340925080
2020-11-05 14:07:24 -08:00
Guice TeamandGuice Team 6eaf556c8b Fix ServletConfig.getInitParameterNames return type.
Closes #1440.

PiperOrigin-RevId: 339960006
2020-10-30 16:30:10 -07:00
Guice TeamandGuice Team 59640fa0df Fix release page link.
PiperOrigin-RevId: 339944405
2020-10-30 14:52:17 -07:00
Guice TeamandGuice Team 383d377436 Bump snapshot version, update README & prior API xml
PiperOrigin-RevId: 339910400
2020-10-30 11:43:16 -07:00