aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2020-08-11Set version number for auto-common to 0.11.upstream/auto-common-0.11upstream-auto-common-0.11Ron Shapiro
2020-08-07Update dependency versions.dpb
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=325291991
2020-07-29Add javadoc to the methods in SuperficialValidation. Also add a private ↵emcmanus
constructor, and rewrite some code to use streams. RELNOTES=Add javadoc for SuperficialValidation methods. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=323682147
2020-07-28Open SuperficialValidation#validateType(TypeMirror) to public visibilitybcorso
so it can be used from other internal code. RELNOTES=Open SuperficialValidation#validateType(TypeMirror) to public visibility ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=323425711
2020-06-18[ #HiltMigration ] Updating BasicAnnotationProcessor to support a ↵armandgray
String-based API. Context: Per discussion in [] this change adds a String-based `Step` class as a replacement for `ProcessingStep`. The new `Step` contains the same two methods (annotations() & process()) which return and accept fully-qualified annotation names. To support the potential absence of the annotation classes from the processor classpath the corresponding methods were changed to no longer depend on explicit Class types. RELNOTES=Adding String-based `Step` as a replacement for `ProcessingStep` to BasicAnnotationProcessor. Allows for fully-qualified Annotation names to be specified in a processing Step in order to remove the requirement that implementation processors depend directly on their Annotation classes. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=316968142
2020-04-15Update versions of Truth and Compile-testing.Sean Sullivan
Closes https://github.com/google/auto/pull/831 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=306447364
2020-03-16Refactor BasicAnnotationProcessor (3 of 3)bcorso
(Context: No rush on these reviews. I was just reading through BasicAnnotationProcessor and decided to clean some stuff up.) Removes some of the duplication between package and type elements in validElements() RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=301196168
2020-03-13Apply a hack to OverridesTest so that it will work with newer versions of ecj.emcmanus
In Google's internal java8 compilation environment, problems with symbolic links mean that ecj can't find the standard system classes without this workaround. In other environments, including Google's java11, this problem doesn't arise. RELNOTES=Make OverridesTest work with Google's internal java8 compilation environment. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=300664328
2020-03-13Refactor BasicAnnotationProcessor (2 of 3)bcorso
This CL reduces some of the conversions between Set<ElementName> and Map<String, ? extends Optional<? extends Element>> where it's not needed. RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=300565432
2020-03-10Refactor BasicAnnotationProcessor (1 of 3)bcorso
This CL just does a format fix and applies some error-prone suggestions on BasicAnnotationProcessor. RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=299896536
2020-01-10Add MoreTypes.isConversionFromObjectUnchecked. This method tells, for a ↵emcmanus
given type, whether casting Object to that type will elicit an "unchecked" warning from the compiler. RELNOTES=Added MoreTypes.isConversionFromObjectUnchecked to test whether casting to a type will elicit an "unchecked" compiler warning. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=288896286
2019-11-21Clarify the documentation of MoreTypes.nonObjectSuperclass.dpb
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=281521515
2019-11-14Automated g4 rollback of changelist 279369564.bcorso
*** Reason for rollback *** :-( rolling this back again because it breaks some targets. java.lang.IllegalArgumentException: <nulltype> cannot be represented as a Class<?>. My guess is that isType() is returning true when it should be returning false for null types, but I'll need to do more investigation. *** Original change description *** Use ElementVisitor rather than Element#getKind() in MoreElements#isType() ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=280489034
2019-11-13Optimize MoreTypes.nonObjectSuperclassbcorso
This CL tries to avoid using expensive method calls like Elements#getTypeElement, TypeElement#getKind(), and Types#directSupertypes. Of all of these, TypeElement#getKind() had the largest cost because it requires symbol completion. In addition, getKind() was being called on unnecessarily on all supertypes, even though only the first type can possibly be an ElementKind.CLASS. RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=280196697
2019-11-11Roll forward of CL 264613939: Use ElementVisitor rather than ↵bcorso
Element#getKind() in MoreElements#isType() *** Original change description *** Use ElementVisitor rather than Element#getKind() in MoreElements#isType() Element#getKind() contains more information than is needed here (we just need to know if the element is an instance of TypeElement, not its kind). Element#getKind() forces symbol completion, which requires parsing the class, so we shouldn't use it unless we have... *** ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=279369564
2019-10-22Helper Methods in AnnotationValuesmahsabadian
RELNOTES=Adding helper methods for getting different types of annotation values with AnnotationValueVisitor. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=275921910
2019-10-14Fix 4 ErrorProneStyle findings:clshepherd
* Constructors and methods with the same name should appear sequentially with no other code in between. Please re-order or re-name methods. * These grouping parentheses are unnecessary; it is unlikely the code will be misinterpreted without them ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=274183390
2019-09-23Suppress emitting errors about unprocessed elements when there are already ↵clayb
errors in the processing round. The extra errors don't add any information and end up hiding the real errors. I found this substantially reduced the issue highlighted in b/141176717. RELNOTES=Suppress error noise in `com.google.auto.common.BasicAnnotationProcessor` ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=270454309
2019-08-23Replace FooVisitor6 and FooVisitor7 with FooVisitor8 throughout auto-common. ↵emcmanus
We have required at least Java 8 for compilation for some time now. TGP: [] RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=264842791
2019-08-19Replace new T[dim].getClass() with class literals: T[].classawturner
Tested: TAP --sample ran all affected tests and none failed [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=259328073
2019-08-19Fix PeerBaseMethod to not rely on implicit ordering of Elements.getAllMethods.bcorso
This CL adds a new method, MoreElements#getAllMethods(), which returns all local and inherited methods (including static methods), but does not include any methods that have been overridden. Note: we are still relying on an explicit ordering for static methods to ensure we don't include hidden static methods from super classes. RELNOTES=Adds MoreElements#getAllMethods(), which returns all local and inherited methods (including static methods), but does not include any methods that have been overridden. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=257649768
2019-08-19Suppress warnings about TypeMirror.equals in some cases where we are calling ↵bhagwani
it deliberately. See [] for more details #TypeEqualsCleanup RELNOTES=Suppress TypeEquals check ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=256471146
2019-08-14Migrate off the overload of fail(...) that accepts a message.cpovirk
We're removing it from open-source Truth, since we're about to permanently commit to the remaining open-source Truth APIs, and we're not sure if assert_().fail(...) offers positive value when assertWithMessage(...).fail() is more in line with normal Truth practices. MOE_MIGRATED_REVID=254043172
2019-05-27Migrate Correspondence subclasses to instead call Correspondence.from.cpovirk
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=249869914
2019-05-05Migrate from containsAllOf to containsAtLeast.cpovirk
The two behave identically, and containsAllOf is being removed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=245840719
2019-05-05Migrate from containsAllIn to containsAtLeastElementsIn.cpovirk
The two behave identically, and containsAllIn is being removed. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=245837617
2019-05-05Stop using auto-parent.cpovirk
It's released separately from all its children, so any updates we make there don't take effect until we make a release and update the child projects to use that. This requires pushing various configuration down into the child projects. Doing so makes the recent attempted update to Truth 0.44 actually take effect. Also, update Compile-Testing to the newly released version, which actually works with Truth 0.44. That upgrade exposes that AutoValue was relying on a transitive dependency on Truth8, which was removed in the latest Compile-Testing, so I've added explicit deps. https://github.com/google/compile-testing/commit/43a513ab14a5b4ab5810a13e14d8cb763546ab5d Also, I removed an explicit version for compile-testing in the AutoValue functional tests. That explicit version may or may not have been needed before, but it shouldn't be now. Likely it would make sense to remove more versions explicitly specified elsewhere. (Additional possible future work: Put deps on other Auto projects (like when AutoService depends on AutoCommon) into <dependencyManagement>.) Finally, I added some <url> values, since Maven has been generating bogus ones all along (by appending the subproject name to the parent URL, producing URLs something like "https://github.com/google/auto/auto-value"). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=245779060
2019-04-29Migrate from assertThat(foo).named("foo") to assertWithMessage("foo").that(foo).cpovirk
(The exact change is slightly different in some cases, like when using custom subjects or check(), but it's always a migration from named(...) to [assert]WithMessage(...).) named(...) is being removed. This CL may slightly modify the failure messages produced, but all the old information will still be present. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=245027656
2019-04-29Update copyrights to say Google LLC instead of Google Inc.emcmanus
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=244250754
2019-03-22Refactor exception-message assertions to use ↵diamondm
ThrowableSubject.hasMessageThat(). This replaces assertions of the form assertThat(e).hasMessage(...) and assertThat(e.getMessage()) with assertThat(e).hasMessageThat(). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=239181584
2019-03-08Stop using reflection now that we require javac8.ronshapiro
And also add asIntersection() since it is now available. RELNOTES=Added `MoreTypes.asIntersection()` ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=237120983
2019-02-13Fix javadoc referenceronshapiro
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=233457151
2018-12-23Fix GeneratedAnnotationsTest so that it works on JDKs 8 through 11.emcmanus
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=226067929
2018-12-03Ignore ECJ test in JDK 10 and 11 since ECJ doesn't work for us in those ↵dpb
versions of the JDK. RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=223350143
2018-11-28Replace usages of @Deprecated methods in com.google.common.io.Files with ↵glorioso
non-deprecated replacements. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=223170828
2018-11-28Fix indentationcushon
RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=222998072
2018-11-06Enable a test for a bug that's been fixed for a whileronshapiro
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=219712298
2018-10-29Fix bug where ProcessingStep.process(...) was called with too many elements ↵dpb
when there had been deferred elements. RELNOTES=Fix bug where `ProcessingStep.process(...)` was called with too many elements when there had been deferred elements. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=218513715
2018-07-23Add MoreElements.asTypeParameter()ronshapiro
RELNOTES=(auto.common) Add `MoreElements.asTypeParameter()` ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=205449221
2018-06-25Add a static overrides() method to MoreElements that uses ExplicitOverrides.dpb
RELNOTES=Add an `overrides()` method to `MoreElements` that is more consistent between javac and ECJ. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=200410431
2018-03-21Document MoreTypes.equivalence().emcmanus
RELNOTES=Document MoreTypes.equivalence(). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=189631496
2018-02-28Remove some garbage seemingly pasted by mistake into ↵peteg
MoreElements.isAnnotationPresent javadoc. :-) RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=187323013
2018-02-15Add a test for GeneratedAnnotationscushon
RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=185615476
2018-01-18Update references to auto-parent 6.dpb
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=182218347
2018-01-16Fix broken @links.dpb
RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=182060148
2018-01-12Add explicit groupId for auto/commonronshapiro
This addresses a NPE as dicussed here: - https://github.com/mojohaus/versions-maven-plugin/issues/51 - https://stackoverflow.com/questions/29995139/maven-versions-maven-plugin-versions-plugin-2-2 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=181663560
2018-01-08Add an implementation of generatedAnnotation that uses the source version ↵cushon
instead of classpath introspection. RELNOTES=N/A ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=181173931
2017-12-28Graduate SimpleAnnotationMirror and SimpleTypeAnnotationValue from Dagger's ↵ronshapiro
internal code to auto-common RELNOTES=Added `SimpleAnnotationMirror` and `SimpleTypeAnnotationValue` to easily create new `AnnotationMirror`s in code. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179840730
2017-12-05Add utility methods within auto-common to determine which @Generated ↵dpb
annotation to use. Add JavaPoet-specific utility methods for JavaPoet users. RELNOTES=Add utility methods for writing `@Generated` annotations. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=178001124
2017-12-04Use dependency and plugin management from auto-parent v5. Use latest ↵dpb
dependencies and plugins for the functional test poms (which don't use auto-parent). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=177592315