Skip to content

spoon-core-5.8.0

Compare
Choose a tag to compare
@surli surli released this 11 Jul 11:50
· 3083 commits to master since this release

This summer release mainly fixes a lot of bugs, in particular in the resolution of TypeParameters which were introduced in previous version.
New experimental features are also introduced in this release.

Thanks all our amazing contributors 👍

New features

  • experimental: Add experimental support for model change listeners. (PR: #1417)
  • import: Sort imports alphabetically. (PR: #1434)
  • metamodel
    • CtTypeMember extends CtNamedElement. (PR: #1452)
    • Add a method to insert a statement at a specific position. (PR: #1423)
    • Annotes getter and setter with a CtRole. (PR: #1377)
    • Add first metamodel support. (PR: #1378)
  • role: Add field annotation with a role. (PR: #1368)
  • template: SubstitutionVisitor can replace substrings in NamedElements and References. (PR: #1441)
  • Add support for replacement by multiple elements CtElement#replace(Collection). (PR: #1369)
  • Add generic type information in shadow classes. (PR: #1352)
  • The template engine supports insertion of literals. (PR: #1403)

Bug Fixes

  • Ignore null items in ReplacementVisitor. (PR: #1400)
  • CtComment#getContent should never return "null". (PR: #1442)
  • Fix a bug with import static. (PR: #1412)
  • Fix issue related to overridden methods in getAllMethods. (PR: #1375)
  • Fix issue in ClassTypingContext#isOverriding. (PR: #1411)
  • Fix bug related to CtTypeParameterReference and getDeclaration. (PR: #1383)
  • Refactor SubstitutionVisitor to support null parameter values. (PR: #1359)
  • Bug with escaped literal. (PR: #1394)
  • Use getTypeDeclaration in CtTypeParameterReference. (PR: #1387)
  • Ignore only ClassCastException in query code. (PR: #1462)
  • Bugs related to continue algorithm of ClassTypingContext. (PR: #1379)
  • Fix regression related to ReferenceBuilder and generics. (PR: #1373)
  • Fix stackoverflow in ReferenceBuilder. (PR: #1367)
  • Calls to default constructors outside the factory should still be possible, and a default factory is made available. (PR: #1448)
  • Fix NPE with union catch inside lambda in noclasspath. (PR: #1416)
  • comment: Printing of comments on MS Windows. (PR: #1435)
  • factory: Create type reference from inner class. (PR: #1361)
  • import: Fix NPE with import scanner. (PR: #1437)
  • prettyprinter: Throws SpoonException with info instead of NPE in Pretty Printer on missing variable declaration. (PR: #1451)
  • reflection: Add annotation value in the model. (PR: #1384)
  • role: Fix wrong roles. (PR: #1397)
  • template
    • Clarifies the contract of proxy template parameters. (PR: #1457)
    • Substitution#insertAll should bypass Template methods. (PR: #1348)
  • printer: Reset import context on reset. (PR: #1360)

Documentation

  • community: Add the integrator rules. (PR: #1413)
  • Explicit the difference between isOverriding and isSubsignature. (PR: #1449)
  • Update roadmap (inline comments are supported + link to 'features' issues). (PR: #1440)
  • Add cool idea in roadmap (by @tdurieux). (PR: #1433)
  • Improve explanation of getDeclaration. (PR: #1429)
  • Update roadmap. (PR: #1432)
  • Adds AutoJMH in the ecosystem page. (PR: #1401)
  • Clean bad comment. (PR: #1380)

Refactoring

  • Change Substitution#createTypeFromTemplate return type to avoid cast. (PR: #1464)
  • Add not-null check. (PR: #1443)
  • Explicit handlingErrorPolicy of JDT in noClasspath and normal mode. (PR: #1424)
  • Printing of lists in Spoon pretty printer. (PR: #1428)
  • GetLabelledStatement is a derived propertty shared between CtContinue and CtBreak. (PR: #1398)
  • role: Rename CtPathRole to CtRole and add new roles. (PR: #1372)

Tests

  • Use the factory instead of the constructor. (PR: #1395)
  • Add test for template substitution of enum values. (PR: #1389)
  • Add test for template substitution of variable access. (PR: #1390)
  • Add test for template substitution of return. (PR: #1391)
  • Add test for SubstitionVisitor class access. (PR: #1388)
  • Test Template array access. (PR: #1353)

Other

  • Remove old useless file. (PR: #1421)
  • Change revapi config for more relevant messages. (PR: #1392)
  • Removes one checkstyle rule. (PR: #1336)
  • Add new architectural rule. (PR: #1355)
  • travis: Fix issue by using the last image on Travis #1414. (PR: #1418)
  • Update release numbers in documentation. (PR: #1351)
  • Prepare for next development iteration.
  • Remove deprecated methods in ImportScanner. (PR: #1366)

Authors

Name Nb Commit
Pavel Vojtechovsky 23
Simon Urli 16
Martin Monperrus 12
Thomas Durieux 11
Benjamin DANGLOT 1