Skip to content

Changes

Summary

  1. Add convenience anonymousClassBuilder(CodeBlock) (#560) (details)
  2. Fix conflicts with types with same name as type being declared  (#559) (details)
  3. Support anonymous inner classes in ClassName#get (#526) (details)
  4. Update changelog for 1.9. (details)
  5. [maven-release-plugin] prepare release javapoet-1.9.0 (details)
  6. [maven-release-plugin] prepare for next development iteration (details)
Commit 40dfa0cf36d844ca733bef0d4a61e87c9339af2c by jesse
Add convenience anonymousClassBuilder(CodeBlock) (#560)
* Add convenience anonymousClassBuilder(CodeBlock)
Resolves #558

* Fix indent
The file was modified src/test/java/com/squareup/javapoet/TypeSpecTest.java (diff)
The file was modified src/main/java/com/squareup/javapoet/TypeSpec.java (diff)
Commit 4cd975b9649ec87f9a71ce48916fba8d9d460e4e by jesse
Fix conflicts with types with same name as type being declared  (#559)
* Add failing tests for types conflicting with type being declared
Also removes previous (flawed) test, which should have
JavaFileTest anyway, and add a separate test for
references self" case (already handled
TypeSpecTest#interfaceExtends btw, but this makes it
tested and expected).
package
Reproduces #470

* Fix conflicts with types with same name as type being declared
Those types (annotations, or referenced in annotation values,
variable bounds, superclass, or superinterfaces)
imported rather than being emitted with their
Fixes #470
The file was modified src/main/java/com/squareup/javapoet/TypeSpec.java (diff)
The file was modified src/test/java/com/squareup/javapoet/TypeSpecTest.java (diff)
The file was modified checkstyle.xml (diff)
The file was modified src/test/java/com/squareup/javapoet/JavaFileTest.java (diff)
Commit ca12c7bafd2d7033f8cff7770ecf2260d45aa4ab by jesse
Support anonymous inner classes in ClassName#get (#526)
* Support anonymous inner classes in ClassName#get
ClassName#get incorrectly used Class#getSimpleName for anonymous inner
classes, which is an empty string.
using Class#getName for anonymous classes and taking the compiler
generated name for the class.

* fix automatic import rearrangement

* remove try-catch block from test
The file was modified src/main/java/com/squareup/javapoet/ClassName.java (diff)
The file was modified src/test/java/com/squareup/javapoet/ClassNameTest.java (diff)
Commit 7931dbd83395806358269d02f827db852234dbda by jwilson
Update changelog for 1.9.
The file was modified README.md (diff)
The file was modified CHANGELOG.md (diff)
Commit dfba6d7272931991e56b0d0ac4b969c17cd3f334 by jwilson
[maven-release-plugin] prepare release javapoet-1.9.0
The file was modified pom.xml (diff)
Commit 5f3b345be9bd8364268d6460424ae8cf59d087f0 by jwilson
[maven-release-plugin] prepare for next development iteration
The file was modified pom.xml (diff)