Releases: INRIA/spoon
Releases · INRIA/spoon
spoon-core-5.5.0
Thanks to all contributors!
New features
- New query architecture with support for Java8 queries. (PR: #1018)
- Allow spoon to do static imports for methods and fields. (PR: #1040)
- Interface to Exclude Compilation Units From CtModel. (PR: #1037)
- API: Add CtTypeMember.getTopLevelType(). (PR: #1004)
- CoreFactory
- Add create(Class) so as to create elements by reflection. (PR: #949)
- evaluation: Simplify classes based on static evaluation (first support). (PR: #1003)
- filter: Compute filtered types by reflection from parameter of method matches. (PR: #1015)
- getDeclaredOrInheritedField: Add CtTypeInformation.getDeclaredOrInheritedField(String fieldName). (PR: #967)
- model: Add interface CtBodyHolder. (PR: #943)
- position: Improve the element position. (PR: #984)
- snippet:
Bug Fixes
- DefaultJavaPrettyPrinted: Fix bug when printing implicit accesses to static fields in autoimport. (PR: #913)
- JDTBasedSpoonCompiler: Fix annotation bug when templates are used. (PR: #934)
- NPE: Fix NullPointerException resulting from variable accesses in constructors. (PR: #1098)
- Fixed name of test class. (PR: #1037)
- Generate expected EOL even on Windows. (PR: #977)
- No exception when writing to log. (PR: #920)
- Test: APITest.testSetterInNodes() was not testing anything . fix #972. (PR: #1022)
- Close input stream after creating a compilation unit to prevent TooManyOpenFilesException. (PR: #1097)
- Fix ReferenceBuilder#getLambdaExecutableReference to return the innermost lambda #1100. (PR: #1103)
- Set the type of a parameter declared in a lambda to Object instead of ommitting them when unknown. (PR: #1108)
- Fixed formatting. (PR: #1037)
- Fix inconsistencies between interface contract and double implementations of getAllExecutables. (PR: #1019)
- Removes unused imports. (PR: #988)
- Clean exception when Spoon is given a wrong path for input resource. (PR: #1057)
- SignaturePrinter: Overrides visitCtAnnotationMethod in SignaturePrinter. (PR: #1030)
- ThisAccess
- access path: Fix regression with type parameters in access paths. (PR: #1007)
- annotations: Fix Dropwazrd regression by fixing substituteAnnotation. (PR: #1032)
- array: The qualified name of an array is not java.lang.reflect.Array. (PR: #995)
- clone: Clone preserves comments and implicitness. (PR: #1028)
- comments
- Fixes pretty-printing bug for inline arrays with comments. (PR: #912)
- Fix bug in comments in array initialization. (PR: #1088)
- Fix a bug concerning multiple comments before a catch block. (PR: #1074)
- Handle stacked comments in package-info.java. (PR: #1011)
- Add support of comments in snippets. (PR: #930)
- enum: GetAllMethods also returns the methods of Enum. (PR: #1016)
- equal
- getTypeDeclaration
- imports
- importscanner: Fix regression in fuly-qualified mode. (PR: #1052)
- isAssignableFrom: Deprecate isAssignableFrom that is totally confusing, and for which there is an alternative. (PR: #948)
- isSubtypeOf: Spoon can resolve anonymous references. (PR: #953)
- launcher: Easy way to parse a complete class with package. (PR: #982)
- log: Filter out some JDT errors in noclasspath. (PR: #926)
- model
- newinstance: Forces usage of the newest version of the class. (PR: #909)
- parent: Stops furious useless exceptions. (PR: #963)
- performance
- position: Implicit elements do not have position. (PR: #1086)
- precompile: Specifies and fixes precompile option. (PR: #923)
- pretty-print
- reference: Fix reference in ctconstructor. (PR: #1095)
- scanner
- Add missing scan properties based on a new powerful specification. (PR: #966)
- serialization: Fix serialization issue in Factory. (PR: #955)
- shadow: No ClassNotFoundException when building shadow classes by reflection. (PR: #1012)
- subtype: Removes CtTypeImpl#isSubtypeOf that is wrong and anyway overridden by all subclasses. (PR: #954)
- template: Check that Template is on source path of builder. (PR: #976)
- test
Documentation
- Add --noclasspath for reducing first-usage friction.
- Clarifies responsibility of CtNamedElement. (PR: #1062)
- Adds adt poster and InDesign source. (PR: #1051)
- Fix markdown issue in code_elements.md.
- Improve readability and wording of doc/comments.md. (PR: #1079)
- Fix broken link.
- Improve navigability and first contact.
- Update README.md (compiling, ecosystem, contributors). (PR: #1089)
- Adds doc about constructor calls and the associated reference. (PR: #994)
- Improve template documentation. (PR: #1068)
- Adds documentation for explaining the code elements. (PR: #922)
- SignaturePrinter: Improves doc of SignaturePrinter. (PR: #987)
- info: Fix broken link to mailing list.
- Fixes a typo in doc/gradle.md. (PR: #1078)
- Fix issues related to javadoc in java 8. (PR: #1105)
Refactoring
- Same algorithm for building sources, templates and snippet. (PR: #946)
- Remove code duplication and fix inconsistencies of class Substitution. (PR: #992)
- Removes dead code. (PR: #989)
- Check everywhere that Template is on source path of builder. (PR: #979)
- Removes old unseless code. (PR: #983)
- Remove unused printer code of visitCtCatchVariable. (PR: #965)
- JDTBatchCompiler arg.sources not needed. (PR: #958)
- Regenerate files with short this for future clean diffs. (PR: #1039)
- Avoid creation of JDT hacking TMP files. (PR: #944)
- JDTBatchCompiler.getUnits() parameter not required anymore. (PR: #942)
- Remove old unmaintained/broken code. (PR: #937)
- All factory methods are also in main Factory for usability and discoverability. (PR: #1082)
- Removes duplicated code. (PR: #936)
- Remove unused imports. (PR: #935)
- Reuse existing CU in JDTBatchCompiler.getUnits(). (PR: #933)
- Introduce JDTBasedSpoonCompiler.buildModel to remove code duplication. (PR: #931)
- Improves JDTCommentBuilder. (PR: #924)
- classloader: Adds test for classloader. (PR: #897)
- printerContext: Assure correct restore of state. (PR: #999)
- processingmanager: Removes duplicated code, improves readability. (PR: #1054)
- Deprecate reference filtering that is now handled by standard element filtering. (PR: #1013)
- Renamed label from units to unitLoop. (PR: #1037)
- Remove dependency to CompilationUnitDeclaration. (PR: #1037)
- Use filter to exclude instead of accapt units. (PR: #1037)
- We must always have a source + exception handling. (PR: #996)
- Added an interface used to filter particular CompilationUnitDeclaraions. (PR: #1037)
Performance
- Cache inputClassLoader corresponding to sourceClasspath. (PR: #990)
- Improve performance of FindCommentParentScanner. (PR: #917)
Tests
- ParentContractTest: Improves contract about setting parents. (PR: #956)
- TemplateMatcher: Add tests for named template matchers (uncovered cases). (PR: #1092)
- VisitorPartialEvaluator: Add tests for VisitorPartialEvaluator. (PR: #939)
- metamodel: Enforce the package design of the metamodel. (PR: #945)
- superClass: Adds test that verifies the compilation of complex superclass references that use access paths with tricky visibility. (PR: #971)
- template: Add test for super interface templates. (PR: #1020)
- templatematcher: Add a new Junit test and dynamic assertion for TemplateMatcher. (PR: #1034)
- Add test for method parameter templating. (PR: #1064)
- Add tests and doc for template engine. (PR: #1072)
- Add a test to check if TemplateMatcher can match two equivalent snippets. (PR: #1059)
- Reduces I/O footprint (and found two IO bugs on the way). (PR: #969)
- Add coverage for templates (and unify API thanks to this). (PR: #1049)
- Add missing @test. (PR: #950)
- One test was not named correctly, hence was not run by Maven in CI, hiding a bug. (PR: #1036)
- Update CompilationTest to match latest compiler changes. (PR: #940)
- Remove unused imports. (PR: #941)
- replacevisitor: Add a strong test and fix many bugs accordingly. (PR: #957)
- Added a test for new compilation unit filter. (PR: #1037)
Other
- changelog: Improve the changelog generator. (PR: #1087)
- jenkins: Purge local repository of all Spoon snapshots. (PR: #1065)
- Change eclipse jdt core dependency now depends on Maven central only. (PR: #1063)
- Update version of spoon-maven-plugin. (PR: #906)
- build.sh: Update minimum version to fix problem with repo.eclipse.org.
- coverage: Update coveralls version. (PR: #1001)
- release: Update version number in documen...
spoon-core-5.4.0
Important changes
- CtElement are not comparable anymore (no natural order), they cannot be put in raw TreeSet (PR: #844)
- The processing and scanning order has changed, it now follows the source code order (Issue: #681) (PR: #841)
New feature
- ast
- Always a block for CtIf and CtLoop. (PR: #805)
- cttype : New method to know whether a given method is part of a CtType. (PR: #880)
- position : Defines a default source position for all elements. (PR: #861)
Fixes
- factory : Handles null parameter in Type#createReference(Class) and isSubTypeOf. (Closes #825). (Issue: #825) (PR: #837)
- getDeclaration : Incorrect between getReference and getDeclaration for local variables. (PR: #888)
- Fixes potential NullPointerException in JDTTreeBuilderQuery. (PR: #887)
- Enables parallel tests. (PR: #838)
- GetAllMethods in noclasspath return when encounter an unknown class. (PR: #864)
- Better getDeclaration of CtLocalVariable (Fixes #868). (Issue: #868) (PR: #873)
- compilation : Always uses the content of the ast to compile the ast (fixes #878). (Issue: #878) (PR: #879)
- exception : Improves snippet compilation error message. (PR: #858)
- if : Print the else body when the body is not a block (closes #881). (Issue: #881) (PR: #883)
- isLocalType : Proper support for creating internal classes (fixes #776). (Issue: #776) (PR: #860)
- literal
- loop : Always use CtBlock in CtForeach. (PR: #847)
- method : Avoid Concurrent modification with CtType#addMethod. (PR: #850)
- position : Add default compilation unit when pretty-printing a new CtClass (closes #885). (Issue: #885) (PR: #886)
- travis : The logs of Travis are not polluted by Javadoc warnings. (PR: #866)
Documentation
- Add missing paper information. (PR: #889)
- Adds doc about architecture checking. (PR: #843)
- Update papers.md. (PR: #834)
- Update on release doc. (PR: #830)
- gradle : Improves Gradle doc (fixes #875). (Issue: #875) (PR: #876)
- support : Improves support documentation. (PR: #865)
- release : Update release number. (PR: #831)
Refactoring
- Allow Launcher to use an existing Factory (Closes #862). (Issue: #862) (PR: #863)
- Fix a test that fails on Eclipse due to its classloader. (PR: #859)
- Removes all useless conditions with CtReference. (Closes #824). (Issue: #824) (PR: #836)
- ast : Improves generic parameter type of setActualTypeReferences. (Closes #823). (Issue: #823) (PR: #835)
- release : Remove deprecated code. (PR: #833)
Other
- jenkins : Clean. (PR: #848)
- pom : Updates commons-io from 1.3.2 to 1.4. (Closes #845). (Issue: #845) (PR: #851)
- release
- travis : Avoid running several times the tests on Travis. (PR: #839)
- version : Update spoon maven plugin version. (PR: #849)
- website : Add a link checker (fixes #797). (Issue: #797) (PR: #872)
spoon-core-5.3.0
New feature
- ast
- wildcard : Creates a new metamodel element for representing a generics wildcard. (Closes #605). (Issue: #605) (PR: #796)
Fixes
- access
- Typecasts on conditionals are not scanned hence not cloned. (PR: #753)
- Avoid NullPointerException in CtExecutableReferenceImpl.getDeclaration. (closes #808). (Issue: #808) (PR: #809)
- Fix NPE in getUsedTypes (Closes #650). (Issue: #650) (PR: #800)
- Fix regressions introduced by #748. (Issue: #748) (PR: #789)
- GetAllMethods returns all methods, incl. those of library superclasses and java.lang.Object. (PR: #771)
- annotation : Supports enum fields with Annotation#annotate() method. (Closes #750). (Issue: #750) (PR: #767)
- actual : Rewrite actual types with their enclosing class. (PR: #789)
- api : CtModel.processWith(). (PR: #821)
- array
- docs : Changes target of getSignature in javadoc. (PR: #742)
- enum : Handle synthetic methods of enums (fixes #793). (Issue: #793) (PR: #794)
- executable
- factory : GetDeclaration from element created by factory should not return null. (closes #719). (Issue: #719) (PR: #735)
- fieldaccess : Static field access in anonymous executable (closes #816). (Issue: #816) (PR: #819)
- import : Skip
findImport
andcreatePackage
if necessary. Fixes #759. (Issue: #759) (PR: #760) - lambda : Resolve Literal#constant if required. Fixes #755. (Issue: #755) (PR: #758)
- method : Search method with generics. (Issue: #573) (PR: #799)
- noclasspath
- Mark target as implicit if it's an anonymous class. (Closes #707). (Issue: #707) (PR: #737)
- Correct reference to parameters in lambda methods. (Closes #779). (Issue: #779) (PR: #802)
- Access lookup in lambda expressions in noclasspath mode. (Issue: #813) (PR: #814)
- Tolerates missing annotation types. (PR: #820)
- Avoid exception when we call getAllFields method. (PR: #780)
- package : Handle packages with only package-info.java. (Closes #748). (Issue: #748) (PR: #766)
- reference
- replace : Use generic replace with CtStatementList elements (closes #792). (Issue: #792) (PR: #795)
- type : Fix exception in noclasspath due to PolyTypeBinding. (Closes #751). (Issue: #751) (PR: #804)
Refactoring
- ref : Removes unused CtCircularTypeReference. (PR: #799)
- visitor : Rename EqualVisitor to DeepRepresentationVisitor. (Closes #791). (Issue: #791) (PR: #801)
- Refactors DefaultJavaPrettyPrinter and JDTTreeBuilder to simplify future maintenance. (PR: #784)
- Moves JDTTreeBuilder inner classes into top-level classes, adds one helper class with static methods. (PR: #746)
- Removes getSignature() and create getShortRepresentation(). (PR: #738)
Spoon 5.2.0
Metamodel
- Clean reset of collections in intercession methods. (PR: #712)
- All setters allow null parameters. (PR: #694)
- Introduces CtModel (Issue: #584) (PR: #589)
- Creates factory methods for primitives. (Issue: #651) (PR: #700)
- Remove CtImplicitTypeRef and CtImplicitArrayTypeRef. (PR: #667)
New features
- shadow : Build shadow elements using Reflection API. (PR: #569)
- checks : Disable AST checks. (Issue: #649) (PR: #684)
- comment
- filter : Adds LineFilter to reason about statements in blocks. (PR: #678)
- clone : Adds the handy CtElement#clone (and deprecates CoreFactory#clone). (PR: #677)
- Refactoring of CtElement.equals for performance. (PR: #674)
- A faster implementation of 'replace' based on code generation. (PR: #632)
Fixes
- annot : Reference to an annotation field as an invocation. (Issue: #578) (PR: #660)
- ast : Align CtNewClass with CtConstructorCall. (PR: #595)
- cache : Invalidate cache of the compiler. (Issue: #575) (PR: #577)
- clone
- comment
- compiler : Add class generated to compilation unit. (PR: #564)
- conditional : Puts parenthesis when it is necessary. (PR: #669)
- factory : Gets inner type from Class/InterfaceFactory. (closes #640). (Issue: #640) (PR: #682)
- filter : Fixes NPE in VariableAccessFilter when the getVariable() is null (e.g. super). (PR: #641)
- getparent : GetParent(Filter) does not return the current element when it matches the filter. (PR: #638)
- lambda : Builds executable ref from a lambda. (PR: #665)
- noclasspath : NPE in a scope usage. (Issue: #574) (PR: #576)
- parent
- performance : Rewrite CtExecutableReference#isOverriding. (Issue: #586) (PR: #592)
- printer : Protects each getParent invocation in DefaultJavaPrettyPrinter. (PR: #704)
- ref : Scan declaring type for CtExecutableReference. (PR: #715)
- unbox : Don't throw a SCNFException with #unbox(). (PR: #620)
- Declaring type OR package should be set for a reference, not both. (PR: #613)
- Annotation values traversal should be delegated to scan(), fixes #603. (Issue: #603) (PR: #614)
- Fix bugs in ImportScannerImpl. (PR: #596)
- Fix a number of bugs related to handling of unnamed packages. (PR: #705)
- Fix bug introduced in #689 (order to iterate with a Deque and Stack are different). (Issue: #689) (PR: #710)
- Fix nullpointer in hasTypeInImports. (PR: #672)
- Use CtTypeParameterRef for formal ops. (PR: #620)
- Fix bugs in ClassFactory.create() methods. (PR: #610)
- Fix many small bugs with double usage of AST nodes in different subtrees,. (PR: #645)
- Doesn't warn for implicit source code. (PR: #696)
- Fix a bug in CodeFactory.createThisAccess() (target was not set). (PR: #612)
- Fix bugs with creating CtTypeAccess without cloning reference, that leads to problems with replace() in graph. (PR: #611)
spoon-core-5.1.1
Hotfix
- Updates remote repository to download JDT.
spoon-core-5.1.0
New features
- Full support of intersection types. #535
- Fluent api to test source code transformations. #517
- Add field at the top of a type. #537
Minor API changes
- Annotation values are handled as CtExpression. #555 #556
- CtVariableAccess#getType does not return null anymore, now delegates to getVariable().getType(). #548
Fixes
- No classpath:
- Generics:
- Fields:
- The qualified name of a type declared in an anonymous class. #541
- Visibility:
- Field access declared in a default class. #543
Refactoring
- Refactored responsabilities of equal/hashcode/signature. #532
spoon-core-5.0.2
Fixes
- Local type shouldn't start its name with its identifier in a constructor.
- Uses CtFieldRead for class access in values of annotations.
spoon-core-5.0.1
spoon-core-5.0.0
API major changes
- Better model for field accesses (now with implicitness information), *.class expressions, and method calls (better handling of static) #475, #473, #458, #458
- Puts CtReference below CtElement (allows you to process, replace references and get signatures). #391
- Deprecates CtTypeAnnotation to use CtAnnotation in refs. #391
API minor changes
- Never throw an UnsupportedOpException in getters. #438
- Delegates type information handling of CtInvocation, CtNewClass and CtConstructorCall to their executable. #433
- Puts CtAnonymousExecutable under CtExecutable. #430
- Minor changes in Snippet helper. #443
Features
- Allow interruption of a processor. #485
- Search a package in imports. #466
- Apply filter on pretty-printed classes. #456
- New filters to get all overridden/overriding methods. #452
- Support filtering on parents (getParent(Filter) method in CtElement). #439
- Delete any element in a Spoon AST. #423
Fixes
- No classpath
- Arguments of an inv should be a CtFieldRead. #502
- Checks if this access parent is final. #497
- Gets package of types in the class declaration. #477
- With an unkown argument, prints . #459
- Supports superclass declared in an interface. #435
- Supports superclass of a nested class. #434
- Supports CtLiteral of char. #429
- Supports CtParameter. #428
- Supports CtFieldAccess. #424, #417
- Supports CtConstructorCall. #416
- Anonymous class in noclasspathmode throws NPE. #415
- Fixes fully qualified name of type ref with generics. #500
- Fixes getDeclaration which throws a NPE in anonymous class. #496
- Prints (i++).toString() and no more i++.toString(). #493
- Fixed the FieldWrite bug in OperatorAssignment. #487
- Allows serialization of SourcePosition. #486
- Fixes the position in the spoon model. #421, #441
- Fixes bug related to insertBefore, insertAfter, insertEnd and getSignature. #450
spoon-core-4.4.1
Fixes
- Supports circular type reference on declaring method: #410