Skip to content

Releases: google/auto

AutoValue Release 1.4 RC2

22 Dec 22:16

Choose a tag to compare

Pre-release

Functional changes since 1.4 RC1

  • Generalized support for property builders. Now, in addition to being able to say immutableListBuilder() for a property of type ImmutableList<T>, you can say fooBuilder() for a property of an arbitrary type that has a builder following certain conventions. In particular, you can do this if the type of foo() is itself an @AutoValue class with a builder. (c8c00a9, 9949290)

  • When an @AutoValue class Foo has a builder, the generated AutoValue_Foo.Builder has a constructor AutoValue_Foo.Builder(Foo). That constructor was never documented and is now private. If you want to make a Foo.Builder from a Foo, Foo should have an abstract method Builder toBuilder().

    This change was necessary so that generalized property-builder support could know whether or not the built class needs to be convertible back into its builder. (f6ee7ab)

Extension API changes since 1.4 RC1

  • The Extension API is now a committed API, meaning we no longer warn that it is likely to change incompatibly. (8cbe76e)
  • Beginning of guide to writing extensions (52e2335).

Bugs fixed since 1.4 RC1

  • Support generic classes with @Memoized (9fa442d).
  • Prepared for Java 9, where public classes are not necessarily accessible, and javax.annotation.Generated is not necessarily present. (44e9235)
  • Functional tests for AutoAnnotation were accidentally excluded from the github sources. They have been restored. (3a8aeef)
  • Added -implicit:class to several test methods in ExtensionTest to work around a compiler warning that causes test failures. (651aa3a)
  • If a property is called oAuth(), allow its setter to be called setOAuth(x). Previously it had to be called setoAuth(x), which is still allowed. (ba55ca4)
  • AutoValue now works correctly even if the version of AutoValue in the -classpath is older than the one in the -processorpath. (e1b3233)
  • Builders now behave correctly when there is a non-optional property called missing. Previously a variable-hiding problem meant that we didn't detect when it wasn't set. (87085a0)

Miscellaneous

  • Tests have been migrated from JUnit 3 to JUnit 4. (b541775)

Auto Common Libraries v 0.8

17 Oct 06:03

Choose a tag to compare

Fixes

  • Fix various incompatibilities between javac and ecj (89dcbae, 3d9fa63)

Notes

  • Various javadoc improvements

AutoValue Release 1.4 RC1

17 Oct 18:25

Choose a tag to compare

Pre-release

Functional changes since 1.3

  • @Memoized added, allowing non-property methods to be run-once and have the results cached.
    • @Memoized methods are guarded double-checked locking (a756ee6)

    • Very tentatively support using @LazyInit from github.com/google/error-prone as a just-in-time alternative
      to @Memoized)

      Note: This is internally tested, but is experimental, and doesn't have any serious testing in open-source.

  • Ignore concrete methods in abstract-class builders when scanning to discover auto-value properties. (07d6fdd)
  • Stop "pessimizing" arrays by pre-sizing them (nearly all VMs perform better without this) (82041d0)
  • AutoValue now imports top-level types, and references nested types in a qualified way. (e.g. Foo.Bar)

Extension API changes since 1.3

  • Introduce null-checks into generated classes' constructors, to guard against poorly crafted extensions. (660ea56)
  • Guard against corrupt extension jar loading (4a052a8)

Bugs fixed since 1.3

  • Fix @AutoAnnotation issue when passing in generic-array-parameter values using a collection. (82041d0)
  • Some fixes inherited from an updated auto-common related to eclipse and ecj
  • Guard against IOExceptions from reading resources from jars. Fixes #365
  • Improved support for dealing with Java8 bytecode on the classpath (using ASM5)

Random stuff

  • Source import statements re-ordered according to Google's new (simplified) standard format.
  • Example code for builders uses "setFoo(Foo foo)" naming for clarity (not required in production code.)
  • Faster jar creation on ubuntu during builds.

Auto Common Libraries v 0.7

08 Sep 07:49

Choose a tag to compare

Features/Changes

  • Add a postRound(RoundEnvironment) method to BasicAnnotationProcessor, to ease
    post-processing (such as validation
  • Switch some anonymous classes to named inner classes to make stack traces more obvious

Fixes

  • Typo in exception message

Notes

  • Javadoc improvements and other documentation fixes
  • Code now conforms to Google's new import order format (static imports at the top, regular imports
    below, separated by one space, all lexically ordered within the two groups.
  • Faster builds on ubuntu by using maven-jar-plugin 2.6 (2.5+ fixes the ubuntu bug)

AutoValue Release 1.3

29 Aug 23:41

Choose a tag to compare

Note: identical to 1.3-rc2.

Functional changes since 1.2

  • Support for TYPE_USE @Nullable.
    This is #293 by @brychcy.
  • Restructured the code in AutoValueProcessor for handling extensions, to get
    rid of warnings about abstract methods when those methods are going to be
    implemented by an extension, and to fix a bug where extensions would not work
    right if there was a toBuilder() method. Some of the code in this change is
    based on #299 by @rharter.
  • Added support for "optional getters", where a getter in an AutoValue Builder
    can have type Optional<T> and it will return Optional.of(x) where x is
    the value that has been set in the Builder, or Optional.empty() if no value
    has been set.
  • In AutoValue builders, added support for setting a property of type
    Optional<T> via a setter with an argument of type T.
  • Added logic to AutoValue to detect the confusing case where you think you
    are using JavaBeans conventions (like getFoo()) but you aren't because at
    least one method isn't.
  • Added a README.md describing EscapeVelocity.

Bugs fixed since 1.2

  • Allow an @AutoValue.Builder to extend a parent builder using the <B extends Builder<B>> idiom.
  • AutoAnnotation now factors in package names when detecting
    overloads. Previously it treated all annotations with the same SimpleName as
    being overload attempts.
  • Removed an inaccurate javadoc reference, which referred to an
    artifact from an earlier draft version of the Extensions API. This is
    #322 by @lucastsa.
  • The constructor of an @autovalue class that has a builder needs to have null checks if there are extensions, because in that case the constructor is package-private rather than private. Fixes #345.
  • When scanning a Builder for referenced types, don't include non-abstract methods. The referenced types are used to determine the imports that will be needed by the implementing class, and that class never references non-abstract methods.

AutoValue Release 1.3-rc2

16 Jun 00:35

Choose a tag to compare

Pre-release

Bugs fixed

  • The constructor of an @autovalue class that has a builder needs to have null checks if there are extensions, because in that case the constructor is package-private rather than private. Fixes #345.
  • When scanning a Builder for referenced types, don't include non-abstract methods. The referenced types are used to determine the imports that will be needed by the implementing class, and that class never references non-abstract methods.

AutoValue Release 1.3-rc1

10 Jun 23:52

Choose a tag to compare

Pre-release

Functional changes

  • Support for TYPE_USE @Nullable.
    This is #293 by @brychcy.
  • Restructured the code in AutoValueProcessor for handling extensions, to get
    rid of warnings about abstract methods when those methods are going to be
    implemented by an extension, and to fix a bug where extensions would not work
    right if there was a toBuilder() method. Some of the code in this change is
    based on #299 by @rharter.
  • Added support for "optional getters", where a getter in an AutoValue Builder
    can have type Optional<T> and it will return Optional.of(x) where x is
    the value that has been set in the Builder, or Optional.empty() if no value
    has been set.
  • In AutoValue builders, added support for setting a property of type
    Optional<T> via a setter with an argument of type T.
  • Added logic to AutoValue to detect the confusing case where you think you
    are using JavaBeans conventions (like getFoo()) but you aren't because at
    least one method isn't.
  • Added a README.md describing EscapeVelocity.

Bugs fixed

  • Allow an @AutoValue.Builder to extend a parent builder using the <B extends Builder<B>> idiom.
  • AutoAnnotation now factors in package names when detecting
    overloads. Previously it treated all annotations with the same SimpleName as
    being overload attempts.
  • Removed an inaccurate javadoc reference, which referred to an
    artifact from an earlier draft version of the Extensions API. This is
    #322 by @lucastsa.