Releases: INRIA/spoon
Release 7.4.0
New features
- Add CtType#toStringWithImports. (PR: #2945)
- Check if a CtType is an array type. (PR: #2882)
- CtBFSIterator: Add an iterator that explores a CtElement's children in breadth first order. (PR: #2904)
- CtElement: Add a method to get all direct children of an element. (PR: #2906)
- CtCommentImpl: Add _setRawContent to be able to bypass cleanComment. (PR: #2889)
Bug Fixes
- Handle special cases in CtAnnotationType. (PR: #2947)
- Test and fix untested method createNewClass(). (PR: #2943)
- Give appropriate permissions of files in doc folder. (PR: #2949)
- Improve getCorrespondingRuntimeObject/convertElementToRuntimeObject to handle shadow fields. (PR: #2899)
- JarLauncher: Fix #2951, Really delete temporary decompiled source directory. (PR: #2952)
- ContextBuilder: Catch PositionBuilder exception and log it instead of crashing. (PR: #2907)
- CtCompilationUnitImpl: ToString() no longer throws a NPE. (PR: #2918)
- position: Type of CtNewClass is implicit without position. (PR: #2834)
- TypeFactory: Raise an exception for deprecated createTypeParameterReference wildcard. (PR: #2890)
Documentation
- Add example for CtAssert#setExpressiont #2917. (PR: #2917)
- Fix links in doc page "Examples of Spoon Usages". (PR: #2932)
- CONTRIBUTING.md mentions our architectural rules. (PR: #2929)
- Add & update links in the example page. (PR: #2925)
- Fix jenkins badge. (PR: #2924)
- Fix typos in slides. (PR: #2948)
- Add example for CtAssert#setExpression. (PR: #2917)
- Fix broken documentation. (PR: #2968)
- Fix remaining Javadoc issues. (PR: #2910)
- Fix doc in JavadocDescription.java. (PR: #2909)
- Improve documentation on AST traversal. (PR: #2905)
- Add slide decks. (PR: #2937)
- Release.md: Improve documentation about releasing after release of 7.3.0. (PR: #2881)
- spoon-control-flow: Fix javadoc errors. (PR: #2916)
- command_line.md: Remove link to decommissioned Gforge. (PR: #2900)
Refactoring
- JDTCommentBuilder: Improve error message with position of offending comment. (PR: #2908)
Tests
- SourcePositionTest: Don't save temporary files in ./src. (PR: #2969)
- Rename ArchitectureTest into DecompilerArchitectureTest in spoon-decompiler to avoid confusion. (PR: #2930)
- CtTypeReference: Add test for methods CtTypeReference#unbox() and box(), fix #1842. (PR: #2919)
- FieldAccessTest: Nested field access, and example for #2884.
Other
- Exclude GUI from coverage. (PR: #2940)
- Switch to junit5. (PR: #2939)
- Add Sonar Quality Gate badge. (PR: #2935)
- Fix javadoc and reporting config and check it in CI. (PR: #2911)
- Clean parent pom.xml. (PR: #2883)
- Bump to 7.4.0-snapshot. (PR: #2874)
Unknown
- Adopt dual licensing MIT-CECILL-C (#2950). (PR: #2950)
- Up. (PR: #2941)
- Update the list of contributors. (PR: #2912)
- Eclipse` in README. (PR: #2903)
Authors
Name | Nb Commit |
---|---|
Martin Monperrus | 28 |
Nicolas Harrand | 9 |
Alexander Shopov | 2 |
Charm | 1 |
Pavel Vojtechovsky | 1 |
GluckZhang | 1 |
Fabien DUMINY | 1 |
Simon Urli | 1 |
Mickael Istria | 1 |
Release 7.3.0
New features
- Introduce the concept of lexical scope (interface LexicalScope). (PR: #2813)
- Allow spoon to support duplicate definitions. (PR: #2772)
- Add module for control-flow analysis. (PR: #2827)
Bug Fixes
- Fix NPE for multicatch qualified exceptions. (PR: #2862)
- Reference of CtImport is fully qualified and has no generics. (PR: #2819)
- IndexOutOfBoundsException in JDTCommentBuilder. (PR: #2840)
- Fix static type wildcard imports. (PR: #2865)
- Refactor code->runtime methods so that CtAnnotation#getValueOfObject does not overflow. (PR: #2866)
- Fix classpath error with surefire. (PR: #2867)
- Security issue with jackson-databind. (PR: #2856)
- CompilationUnit has lineSeparatorPositions even for empty class. (PR: #2824)
- Fix position of type modifier after comment. (PR: #2825)
- NPE in JDTCommentBuilder. (PR: #2822)
- PositionBuilder: Prevents exception for incomplete modifiers' position information. (PR: #2848)
- position
- doc: Fixes#2790 javadoc site deployment, adapting to new modules organization. (PR: #2826)
Documentation
- Fix broken link. (PR: #2871)
- Fix unrendered link in doc. (PR: #2851)
- Fix broken snippet. (PR: #2841)
Refactoring
- Rename getCurrentNameScope to getCurrentLexicalScope. (PR: #2857)
- Access to JDK CompilationUnit contents and lineSeparatorPositions. (PR: #2831)
- Refactor refactoring code :-) in Refactoring#copyType(). (PR: #2820)
- performance: Optimize incremental launcher. (PR: #2821)
Tests
Other
- pom.xml: Updating commons-io and commons-lang3. (PR: #2853)
- Moves JUnit dependency to parent pom. (PR: #2828)
- Clean old Travis scripts. (PR: #2829)
Community
- Nicolas Harrand becomes integrator. (PR: #2818)
Authors
Name | Nb Commit |
---|---|
Pavel Vojtechovsky | 10 |
Martin Monperrus | 9 |
Egor Bredikhin | 3 |
Nicolas Harrand | 3 |
Thomas Durieux | 1 |
Kai Luo | 1 |
Benjamin DANGLOT | 1 |
Lionel Seinturier | 1 |
Simon Urli | 1 |
Clément Fournier | 1 |
Release 7.2.0
New features
- Add CtImportVisitor. (PR: #2730)
- Add CtTypeReference#canAccess(CtTypeMember). (PR: #2815)
- AllTypeMembersFunction has new mode SKIP_PRIVATE. (PR: #2803)
- Add support for javadoc inline tags. (PR: #2802)
- Add encoding detection callback. (PR: #2788)
- EarlyTerminatingScanner can scan content of compilation units. (PR: #2793)
- Add assertCtElementEquals. (PR: #2767)
- Add CtAbstractImportVisitor. (PR: #2764)
- Add CtTypeReference#implicitParent. (PR: #2805)
- Add CtComment#getRawContent(). (PR: #2746)
- New CtTypeMemberWildcardImportReference for
import package.Type.*
. (PR: #2731) - CtScannerListener knows role of scanned element. (PR: #2739)
- Add CtCompilationUnit for future import and sniper improvements. (PR: #2702)
- Use Apache Common Compressor API to [de]compress serialized models. (PR: #2165)
- Add metamodel concept CtPackageDeclaration. (PR: #2707)
- Add support for Fernflower for decompilation. (PR: #2668)
- Add support for transformation at load-time in the JVM. (PR: #2645)
Bug Fixes
- CtQueryImpl#detectTargetClassFromCCE, FilterTest#testInvalidQueryStep: Adapt parsing of ClassCastException message which has changed in oracle jdk 11. (PR: #2787)
- FieldAccessTest: Adapt FieldAccessTest to oracle jdk 11/jdt changes. (PR: #2789)
- MainTest: Quickfix for Travis 10min timeout. (PR: #2667)
- doc: Explain the different kinds of pull-requests. (PR: #2647)
- documentation: Pattern.md. (PR: #2735)
- javadoc: Replace deprecated by better javadoc. (PR: #2663)
- printer: Add space before
else
ofif
statement. (PR: #2679) - test
- Modifiers of enum members. (PR: #2630)
- One can call getModifiers on ".class" of "Aclass.class". (PR: #2776)
- Fix incomplete behavior: Javadoc#setContent should parse tags. (PR: #2765)
- Parsing of java version not starting with "1." in pom.xml. (PR: #2729)
- CtPackageDeclaration has a valid source position. (PR: #2760)
- JDT spoon compiler builds imports and then comments. (PR: #2807)
- Broken link in papers.md. (PR: #2749)
- CtImport position includes its comment. (PR: #2810)
- PatternMatcher ignores isImplicit. (PR: #2726)
- CtExecutableReference cannot use CtTypeParameterReference. (PR: #2725)
- Upgrade insecure commons-compress to latest version. (PR: #2717)
- Fix comment of CtAnnotation value. (PR: #2587)
- MetamodelProperty#containerKindOf knows Collection. (PR: #2705)
- Invalid error log message in ContextBuilder#getVariableDeclaration. (PR: #2677)
- CtPackageDeclaration position doesn't include top file comment. (PR: #2811)
- Sniper printer leaves when no more child tokens. (PR: #2808)
- ChangeCollector detects changes in CtCompilationUnit too. (PR: #2794)
- Use Environment encoding when writing files on disk. (PR: #2796)
- Fix invalid if model with empty statements in then/else branch. (PR: #2733)
Documentation
- Improve documentation about release process. (PR: #2650)
- Remove all hard coded version numbers to simplify release. (PR: #2786)
- Spoon-decompiler is not spoon-bytecode. (PR: #2784)
- Getting started for external dependency. (PR: #2752)
- Fix broken link in doc. (PR: #2743)
- Fix javadoc in TypeFactory.java. (PR: #2688)
- Remove link to decommissioned Gforge. (PR: #2792)
- Updated spelling and formatting of path.md page. (PR: #2696)
- Add missing javadoc for PatternPrinter. (PR: #2689)
- Fix @link in javadoc. (PR: #2685)
- Fix contract sentence. (PR: #2691)
- Add example in path.md. (PR: #2661)
- website: Document IncrementalLauncher. (PR: #2651)
Refactoring
- Fix sonarqube - use Java array syntax (not C-like). (PR: #2686)
- Better handling of SourceFragment in CompilationUnit. (PR: #2806)
- Sort modifiers in ModelStreamerTest.java. (PR: #2755)
- Excluding decompiler related features from spoon-core. (PR: #2766)
- GetDocComment uses the same implementation as pretty-printer. (PR: #2775)
- Improve error message with Spoon testing fluent API. (PR: #2769)
- In clone code, builder.copy is called first. (PR: #2768)
- JavaOutputProcessor uses Environment#createPrinter(). (PR: #2759)
- Better error handling in CtFieldReference#getActualField. (PR: #2754)
- Replace
List<? extends Object>
byList<?>
in PatternTest. (PR: #2753) - Remove redundant cast. (PR: #2700)
- Remove useless assignment in JDTTreeBuilderHelper.java. (PR: #2690)
- Simplify negation (fix SonarQube). (PR: #2695)
- CtTypeAccess#implicit is derived now. (PR: #2804)
- Change assertion from assertSame to assertEquals. (PR: #2687)
- Remove redundant parentheses in PatternBuilder. (PR: #2653)
- Use static import for asserts in tests. (PR: #2655)
- Remove redundant 'super' call from SpoonClassFileTransformerTest.java. (PR: #2678)
- SourcePosition#equals should take into account all information. (PR: #2660)
- Replace by . (PR: #2675)
- Flip order of comparison - put literal first to lower risk of NPE. (PR: #2674)
- Add missing braces to tests. (PR: #2673)
- Remove deprecated annotation (for sonarqube). (PR: #2665)
- Add final modifier. (PR: #2664)
- Stream handling in SerializationModelStreamer#load(InputStream). (PR: #2635)
- Replace
length()==0
byisEmpty()
. (PR: #2658)
Performance
- .travis.yml: Merge travis builds to fall under 5 builds. (PR: #2782)
- MainTest: Parallelize execution of testElementToPathToElementEquivalency. (PR: #2694)
- Cache result of CtTypeReference#findClass(). (PR: #2591)
Tests
- Remove long logs fof CtGenerationTest which makes CI log unreadable. (PR: #2750)
- Minimize logs in FilterTest. (PR: #2756)
- Generic contracts are run only on .testclasses.. (PR: #2716)
- Use contains instead of indexOf. (PR: #2715)
- Relax intercession test to prepare #2615. (PR: #2706)
- Remove redundant cast. (PR: #2704)
- Relax intercession test to prepare #2615.
- Constructor with this(xxx) replaced by super(xxx)?. (PR: #2680)
- In tests also, windows's classpath elements are separated by semi column. (PR: #2692)
- IncrementalLauncherTest: Attempt to remove flackiness on windows CI. (PR: #2745)
Other
- Do not execute checkstyle for all jobs. (PR: #2799)
- Maven-javadoc-plugin now supports the doclint parameter. (PR: #2800)
- Check style doesn't check left curly on lambda. (PR: #2795)
- Update build.sh to use the correct snapshot repo in Jenkins. (PR: #2777)
- Change jenkins/build.sh to allow passing maven parameters. (PR: #2723)
- Fix security issue in dependency. (PR: #2697)
- Prepares checkstyle checking for src/test/java. (PR: #2611)
- Remove deprecated methods after release. (PR: #2649)
- Bump info after release of 7.1.0. (PR: #2648)
Unknown
- 7.2.0 released on Central.
- Explicit rule on how integrators are chosen. (PR: #2791)
- AccessFullyQualifiedFieldTest.java. (PR: #2656)
Authors
Name | Nb Commit |
---|---|
Pavel Vojtechovsky | 38 |
Martin Monperrus | 27 |
Tomasz Zieliński | 23 |
Nicolas Harrand | 12 |
Egor Bredikhin | 3 |
Simon Urli | 3 |
Mehdi Kaytoue | 1 |
lodart | 1 |
raymogg | 1 |
Release 7.1.0
Changelog at #2489
spoon-core-7.0.0
Changelog
All potentially breaking changes are marked with a ":warning:"
Major new features
- Java 10 is now fully supported in Spoon (PR: #2054)
- A new mechanism for matching code called "Pattern", see http://spoon.gforge.inria.fr/pattern.html. Kudos to @pvojtechovsky for this amazing job! (PR: #1686)
New features
⚠️ Explicitly fail when an element is added twice to two different parents. (PR: #2009)⚠️ Enable comments by default. (PR: #2065)- One can get annotation values directly. (PR: #2036)
- Add the ability to follow the progress of the creation of the Spoon model. (PR: #2043)
- Add support for incremental build. (PR: #1905)
- Handles range version in MavenLauncher. (PR: #2057)
- Introduce the concept of "Pattern". (PR: #1686)
- Add CtAnnotation#getAllValues to reason about all annotation values. (PR: #2042)
- Gzip model serialization. (PR: #2103)
- EqualsVisitor can report which attribute is not equal. (PR: #1998)
- Add CtElement#descendantIterator and CtElement#asIterable. (PR: #1986)
- Add CtIterator for dfs-based iteration of CtElement's descendants. (PR: #1980)
- Add SourcePosition#isValidPosition(), to detect invalid position without null or -1 checks. (PR: #1964)
- Add #getSourceDetails to debug source code positions. (PR: #1950)
- API methods to know when the initial model is built. (PR: #2138)
- Add support to Java 10. (PR: #2054)
- Add CtAnnotation#getWrappedValue to provide a regular interface for annotation values. (PR: #1935)
- experimental: Add ChangeCollector to listen on changes and remembers them. (PR: #1941)
- position: Add the position of the modifier in the ast. (PR: #1959)
Bug Fixes
- executable: Fix npe in getExecutableDeclaration when declaring type is null. (PR: #2021)
- mavenlauncher: Add support for Maven dependency management. (PR: #2024)
- metamodel: Mark unsettable setters of name, modifier and label. (PR: #2048)
- module: Spoon is able to build Java 9 code with modules in full classpath. (PR: #2070)
- pattern: Improve handling of CtTypeReference Pattern parameters. (PR: #2078)
- position
- Fix enum constructor call. (PR: #2146)
- Fix position of nested type arguments like List<List<?>>. (PR: #2142)
- Fix position of CtForEach. (PR: #2152)
- Invalid end column. (PR: #2159)
- Position of expressions ending with wildcard. (PR: #2151)
- Position of CtCase includes it's statements. (PR: #2150)
- Fix position of
String arg[]
and lambda parameter. (PR: #2149) - CtCatch has no modifiers, they are in CatchVariable. (PR: #2156)
- Fix source position of empty method body. (PR: #2145)
- reference: Fix npe in getTypeReference when the reference is null. (PR: #2020)
- Bug in AccessibleVariablesFinder when executed after PartialEvaluation. (PR: #2123)
- Fix line separators in test. (PR: #2111)
- The imports are properly computed after processing. (PR: #2083)
- Finish the change about the default classpath mode. (PR: #2074)
- Enum#valueOf is now well shadowed. (PR: #2096)
- Bug when getting CU from a parsed snippet. (PR: #2086)
- Fix source position of CtCatch and CtCatchVariable. (PR: #2128)
- DJPP is more tolerant to inconsistent model. (PR: #1903)
- Init RoleHandler lazily to pass when RoleHandler is generated. (PR: #2068)
- Fix missing license header. (PR: #2075)
- Fix regression in Template. (PR: #2069)
- Proper support for "Object[]::new" constructs. (PR: #1945)
- NPE when calling getQualifiedName on some CtFieldReference. (PR: #2135)
- Fix position of (String arg[]). (PR: #2015)
- Support creation of partial shadow classes. (PR: #2040)
- VarArgs parameters always have a CtArrayTypeReference type. (PR: #2131)
- Prevent NPE due to getDeclaringType. (PR: #2039)
- Fix regression due to #2009. (PR: #2035)
- CtAnnotation#getValue returns the default value if one exists. (PR: #2034)
- Detection of lambda expression method. (PR: #2023)
- Expression type cast source positions. (PR: #2113)
- Fix low-level JDT error due to some annotations (in particular @nullable). (PR: #1975)
- Npe in getEnclosingType when getTypeDeclaration is null. (PR: #2033)
- Fix when interface method overrides object method. (PR: #2025)
- Fix CtTypeParameter creation in shadow mode. (PR: #2031)
- Consistent contract for getActualClass: never returns null. (PR: #2027)
- Fix SonarQube warning by addiing transient modifiers in SpoonObjectFieldsTable. (PR: #2121)
- EOL were not fully taken into account in Spoon. (PR: #2122)
- Clarify Environment#checksAreSkipped and associated setters. (PR: #2011)
- Set parent of auto-created CtExecutableReference. (PR: #2007)
- Manage generics from interfaces in shadow mode. (PR: #1914)
- Fix visibility of enum values. (PR: #1999)
- Fix actualTypeArguments of array type reference. (PR: #1997)
- SetModifiers(Collections.emptySet()) resets modifiers now. (PR: #1992)
- Don't fail on ClassNotFoundException in CtQueryImpl. (PR: #1996)
- NPE when CtQueryImpl#detectTargetClassFromCCE return null. (PR: #1995)
- Handle comments at the bottom of a file. (PR: #1976)
- Catch NoClassDefFoundError when we try to import a class absent from the classpath. (PR: #1974)
- Fix LineFilter for loops with no body. (PR: #1973)
- Fix the position of catch variables. (PR: #1969)
- Set the constructor implicitness directly in JDTTreeBuilder. (PR: #1958)
- Fix the source start and source end of package. (PR: #1957)
- Fix failing build because of the usage of random in CompilationUnit comparison. (PR: #1954)
- Provide default sorting of compilation units. (PR: #1938)
- Remove useless CtPackageImpl#getPosition. (PR: #1952)
- Fix position of new
new SomeInterface() {...}
. (PR: #1949) - Fix positions of TypeParameter, annonymous classes, and methods without modifiers. (PR: #1948)
- Add a log warning in verifySourceClasspath. (PR: #1937)
- Fix class class-level comments' position. (PR: #1931)
- Always create new type reference for primitive type. (PR: #1940)
- Comments after class name and before type members are associated to correct node. (PR: #1939)
- Typo in javadoc of CtModel. (PR: #1942)
- CtCatchVariable#getType() in noclasspath mode may return null. (PR: #1932)
- Fix bugs and resource leaks found with error-prone. (PR: #1924)
- Derived properties return unmodifiable collections. (PR: #1923)
- CompilationTest#testFilterResourcesDir file separators on Windows. (PR: #1925)
- All unsettable properties in the metamodel are derived too. (PR: #1904)
- Comment /*/ parsing in JDTCommentBuilder. (PR: #2032)
Refactoring
⚠️ comment: Creating an inline comment with newline separators throws an exception. (PR: #2080)⚠️ Move experimental.modelobs to support.modelobs. (PR: #2140)⚠️ Remove deprecated elements from last release of Spoon. (PR: #2098)⚠️ Remove usage of getActualClass() from CtTypeReferenceImpl. (PR: #2037)⚠️ Set noclasspath to true as default. (PR: #1936)⚠️ Launcher#setArgs cannot be called twice. (PR: #2141)- position: CompoundSourcePosition extends SourcePosition. (PR: #2115)
- Avoid duplicated calls in ImportScannerImpl. (PR: #2134)
- Refactor imports of CtRole. (PR: #2132)
- Deprecate methods computeImports in DJPP. (PR: #2124)
- Fix checkstyle in tests. (PR: #2127)
- Add transient modifiers in StandardEnvironment.java. (PR: #2059)
- Remove old broken untested mechanism "buildOnlyOutdatedFiles". (PR: #1913)
- Slightly change the import API. (PR: #2110)
- Report missing parameter value in exception. (PR: #2079)
- Fix bad resource usage with try-with-resources. (PR: #2045)
- Move metamodel from src/test to src/main. (PR: #2016)
- GetTypeDeclaration cannot crash in noclasspath mode. (PR: #2028)
- Introduce ModelList and ModelSet, collections specific to Spoon that handle parents and change events. (PR: #1917)
- Get*Field now use shadow types. (PR: #2008)
- EqualsChecker#setNotEqual can be used to debug non-equality. (PR: #1993)
- PartialSourcePosition only supports getCompilationUnit for fail-fast behavior. (PR: #1963)
- Encapsulate try-with-resources for printing lists in DefaultJavaPrettyPrinter. (PR: #1956)
- Never return null from CtElement#getPosition() but NoSourcePosition. (PR: #1951)
- EnumValues constructor call should be marked as implicit. (PR: #2090)
- Remove old, unused, untested class Timer. (PR: #2017)
- Allow to use @experimental on a single method. (PR: #2099)
Tests
- Unify MetamodelTest and MetaModelTest. (PR: #2012)
- Improve MainTest. (PR: #2144)
- Fix CtGenerationTest#testGenerateRoleHandler egg/chicken problem. (PR: #2087)
- Better tests for derived and unsettable properties. (PR: #2050)
- Fix MavenLauncherTest. (PR: #2049)
- Compare the computed imports against human imports. (PR: #1365)
- Add test to check that all setters trigger a change event. (PR: #2010)
- Fix MavenLauncherTest to find paths using File separator. (PR: #2129)
- Ignore OS specific EOL. (PR: #2006)
- SpoonMetaModel can be built without spoon sources, only using shadow classes. (PR: #1907)
- Remove testIncrementalModel. (PR: #2004)
- Add test for ExpressionTemplate. (PR: #2002)
- Add new test for shadow enums. (PR: #1926)
- Add a test to check that in NO_OUTPUT mode, nothing is created. (PR: #1915)
- Remove unused imports from tests. (PR: #2104)
- Make checkstyle happy. (PR: #2116)
- refactor
- Typo: invokation -> invocation. (PR: #2114)
Documentation
spoon-core-6.2.0
Thanks for the new contributors on this release 👍
New features
- Add support to change the destination file on disk for modules, packages and types. (PR: #1610)
- Add CtScanner#scan(Map) for a better EarlyTerminatingScanner. (PR: #1805)
- Add support for paths for all elements from model root (CtElement#getPath). (PR: #1874)
- One could add a type member that already exists (equals but not same) and modify it afterwards. (PR: #1864)
- Add method CtMethod#getTopDefinitions. (PR: #1844)
- Add Refactoring#copyType and #copyMethod for advanced cloning. (PR: #1884)
- All RoleHandlers supports set/add/remove. (PR: #1793)
- Add methods getRoleHandlers(Class), forEachRoleHandler, getRoleHandlerWrtParent in RoleHandlerHelper. (PR: #1794)
- SpoonModelTree GUI can be created with a custom root element. (PR: #1799)
- Add support for clone process customization with CloneHelper#addClone. (PR: #1802)
- Spoon Filter implements java.util.function.Predicate. (PR: #1798)
Bug Fixes
- GetDocComment returns the complete Javadoc comment, incl. tags. (PR: #1822)
- Add RoleHandler setter for SUPER_TYPE and INTERFACE. (PR: #1890)
- CtCatchVariable#multiType role TYPE changed to MULTI_TYPE. (PR: #1877)
- Fully comply with the contract of CtScannerTest#testScannerCallsAllProperties. (PR: #1870)
- Change how DJPP prints "return" so that it's checkstyle-compliant. (PR: #1871)
- Unsettable properties are now really unsettable, and there is a test for this. (PR: #1893)
- Fix equality for assignments. (PR: #1845)
- GetDocComment() returns asterisk (*) and spaces before comment. (PR: #1841)
- Small bugs in MethodTypingContext and CtTypeReference. (PR: #1838)
- ClassTypingContext resolveTypeParameter can gracefully handle outer parameters. (PR: #1837)
- Fix StringIndexOutOfBoundsException in CtJavadoc#getShortDescription. (PR: #1827)
- TypeFactory#get(qualifiedName) for class names containing
$
. (PR: #1891) - Stackoverflow on AbstractTypingContext. (PR: #1817)
- NPE when using MavenLauncher on module containing dependency with variable. (PR: #1810)
- Undo #1798 for backward compatibility. (PR: #1811)
- Filter extends Predicate is now working with projects in JDK7. (PR: #1808)
- Shadow classes should be interpreted according to their kind (enum, interface, etc). (PR: #1806)
- Easier specification of template parameters (without annotations). (PR: #1801)
- DefaultJavaPrettyPrinter prints an ERROR comment instead of raising an exception when a field is missing in the model. (PR: #1797)
- Various fixes in VisitorPartialEvaluator. (PR: #1800)
- DefaultJavaPrettyPrinter exposes the tokenWriter for subclasses. (PR: #1796)
- ParentFunction doesn't fail on null parent. (PR: #1795)
- Add generic typing to TypeFactory constants. (PR: #1792)
- serialization: SourcePosition#getFile() after deserialization. (PR: #1847)
- Fix order of type members. (PR: #1787)
Documentation
- Add missing javadoc. (PR: #1843)
- Add missing Javadoc in ModelsUtils. (PR: #1860)
- Missing documentation in public methods used for pretty-printing. (PR: #1854)
- Another set of Javadoc comments for public methods. (PR: #1856)
- Add API documentation to interface JavaReflectionVisitor. (PR: #1850)
- Add doc for public method in RtMethod. (PR: #1858)
- Fix Javadoc (incorrect starting tag). (PR: #1839)
- Fix missing javadoc. (PR: #1840)
- Improve Javadoc of #getAllMethods. (PR: #1836)
- Improves the documentation of getOverridingExecutable. (PR: #1828)
- Bump Spoon number in doc. (PR: #1790)
Refactoring
- Improve Meta-Metamodel classes in src/test. (PR: #1894)
- Refactor cloning code to increase extendability. (PR: #1878)
- Remove CtParameterReferenceImpl#declaringExecutable. (PR: #1875)
- Push down the equality checking code in EqualsVisitor. (PR: #1853)
- Hide some methods that are clearly meant to be package visible. (PR: #1855)
- Internal utility type in JDTTreeBuilder should be package-visible. (PR: #1848)
- Package-visible class CommentHelper should have package-visible methods. (PR: #1849)
- Remove wrong comments and unused imports. (PR: #1803)
- prettyprinter: Restore DJPP#writeHeaders that clients can override. (PR: #1866)
Tests
- architecture: All public API methods should be documented with Javadoc. (PR: #1867)
- Fix CI failure due to interaction between #1864 and #1787. (PR: #1868)
- Move metamodel related method to class SpoonMetaModel for better discoverability. (PR: #1851)
- Add method ModelUtils#getOptimizedString for handling EOL, TAB, etc in assertions. (PR: #1804)
Chores
- Enable unchecked compiler warnings. (PR: #1886)
- Enables incremental compilation. (PR: #1885)
- Fix javadoc linter config in pom.xml. (PR: #1881)
- Add Eclipse's .checkstyle to .gitignore. (PR: #1882)
- Add a script to update pom.xml for running pit-descartes. (PR: #1820)
- Add CI script to check whether Spoon compiles with Maven 3.3.9. (PR: #1815)
- revapi: Fix revapi commenting bot. (PR: #1863)
- Prepare for next development iteration.
Authors
Name | Nb Commit |
---|---|
Martin Monperrus | 30 |
Pavel Vojtechovsky | 21 |
Simon Urli | 9 |
Egor18 | 4 |
Nicolas Harrand | 2 |
Thomas Durieux | 1 |
Shantanu | 1 |
spoon-core-6.1.0
Christmas release! 🎄 🎅 ✨
The main new feature of this release is the integration of Java 9 module in Spoon model, but it also contains some other new features and bug fixes.
Thanks for the contributors, merry christmas and happy new year for all of you :)
New features
- Add Factory#createQuery(Iterable). (PR: #1777)
- Add a method to get the unit type of the compilation unit. (PR: #1776)
- Add support for Java9 constructs in the Spoon metamodel (CtModule and related concepts). (PR: #1730)
- Support partial evaluation of new Object[]{...}.length -> Literal. (PR: #1750)
- Add an explicit construct for imports in the metamodel (CtImport). (PR: #1707)
- Add method hasAnnotation. (PR: #1737)
- Add inheritance between roles (CtRole#getSuperRole(), CtRole#getSubRole()). (PR: #1725)
- CtModel implements CtQueryable. (PR: #1739)
- Processor properties can be passed as string. (PR: #1734)
Bug Fixes
- CompilationUnits are created on demand. (PR: #1782)
- Start prefix space in ElementPrinterHelper. (PR: #1768)
- Fix a NPE in CtTypeImpl#isSameParameter in noclasspath. (PR: #1767)
- CtQueryImpl handles well preallocated exceptions done by JVM optimization. (PR: #1759)
- Fix bug in partial evaluator. (PR: #1751)
- Fix dirty exception in checking code at the end of model building. (PR: #1749)
- annotation: Bug when using an annotation targeting declaration and types. (PR: #1774)
- test: Improve CtGenerationTest and CtScannerTest. (PR: #1736)
Documentation
- Add explanation in Javadoc of CtTypeReference#getActualClass. (PR: #1761)
- Bump version number after release 6.0.0. (PR: #1732)
Refactoring
- OutputType is available in Environment. (PR: #1784)
- CompilationUnit returns an unmodifiable collection. (PR: #1781)
- Manage sourceOutputDirectory in Environment. (PR: #1770)
- SetSourceClasspath throws an exception in case a .class is given. (PR: #1766)
- Add a new way to build a query in QueryFactory. (PR: #1740)
Tests
- Check inheritance behaviour when using noclasspath with a sourceclasspath. (PR: #1760)
- Refactor test to be independent from JDK version. (PR: #1764)
- Metamodel's MMField valueTypes are not implicit. (PR: #1756)
- Add test for substitution of
return expression.S()
with expressions. (PR: #1755) - Prepare upcoming behavioral change in template matcher. (PR: #1748)
- Add test for getAnnotation().value() on shadow classes. (PR: #1738)
Other
- Skip checkstyle in Travis install phase. (PR: #1746)
Unknown
- Prepare for next development iteration.
Authors
Name | Nb Commit |
---|---|
Simon Urli | 20 |
Pavel Vojtechovsky | 9 |
Martin Monperrus | 3 |
spoon-core-6.0.0
New major Spoon 6.0.0 release 🎉
Thanks to all contributors on this amazing release 👍
New features
- Roles
- Introduction of TokenWriter to support custom formatting of pretty-printed code. (PR: #1494)
- Spoon runs on Java9 JVM with JDK9. (PR: #1585)
- Add TypeFactory LIST, SET, MAP, ... constant type references. (PR: #1660)
- Add new create method in Factory. (PR: #1659)
- Add CtPackage#getQualifiedName. (PR: #1652)
- The cloning behavior can be subclassed. (PR: #1580)
- Add a static method to getting started with one single line of code. (PR: #1559)
- Add support for analyzing whether a type reference is generic or not (method isGeneric). (PR: #1562)
- Add support for implicit / explicit modifiers (CtExtendedModifier). (PR: #1649)
- Add simple support for enter/exit in DJPP as in CtScanner. (PR: #1538)
- Create a launcher to analyze maven projects. (PR: #1533)
- Add utility methods in CtModifiable. (PR: #1726)
Bug Fixes
⚠️ [BREAKING] Fix ClassTypingContext#isSameSignature for generic methods. (PR: #1639)⚠️ [BREAKING] SetVisibility should only be used with private, public or protected. (PR: #1705)⚠️ [MAYBE BREAKING] Less hashcode collisions for CtReference. (PR: #1717)⚠️ [BREAKING] Move deprecated classes to spoon.legacy. (PR: #1518)⚠️ [BREAKING] Template: Replacing of field access by refining behaviour of String parameter. (PR: #1476)⚠️ [BREAKING] Remove the useless factory in Environment. (PR: #1673)⚠️ Fix bug with repeatable annotations. (PR: #1724)- Typo in RoleHandlersGenerator. (PR: #1709)
- Method with varargs should never be transient. (PR: #1701)
- JDTImportBuilder should not import all public methods from interfaces. (PR: #1620)
- Explicit "final" modifier are possible in catch variables and should be kept when pretty-printing. (PR: #1690)
- CtVariableAccess#getVariable() sets the type of "super". (PR: #1684)
- MavenLauncher warns when a provided dependency is not loaded. (PR: #1681)
- Add position for implicit blocks. (PR: #1678)
- Bug related with cloning newClass invocation with anonymous class. (PR: #1667)
- Improve contract+test of CtScanner and it relation to roles. (PR: #1642)
- In CtCatchVariable set/getType is derived from multiType. (PR: #1668)
- AbstractTypingContext should set consistent parents. (PR: #1664)
- [BREAKING] CtTypeParameterReference#getBoundingType() consistently returns null when Object is the bound. (PR: #1661)
- Remove useless code on CtElement#setParent. (PR: #1662)
- Change default log level. (PR: #1646)
- Fix StackOverflow in MethodTypingContext on <T, U extends T>. (PR: #1640)
- Fix NPE in MavenLauncher when there is no build section. (PR: #1720)
- CtTypeInformationTest now use patch JDK version for the expected test number. (PR: #1721)
- Optional maven dependencies should not be passed to SpoonMavenLauncher. (PR: #1619)
- Fix bug related to generics in CtTypeReference in noclasspath. (PR: #1609)
- Auto-imports works for package-info. (PR: #1611)
- CtNewClassImpl#setAnonymousClass has CtRole.NESTED_TYPE not CtRole.EXECUTABLE. (PR: #1605)
- Pretty printer adds no space before comma in new array expression. (PR: #1602)
- Spoon model is a tree not a lattice. (PR: #1592)
- ImportBuilder checks visibility when importing starred imports. (PR: #1588)
- The query engine also works on JVMs where lambdas are not in stack trace elements. (PR: #1579)
- Cleaning of method signature computation. (PR: #1561)
- DJPP sends "class" as keyword and wildcard "?" as separator token. (PR: #1568)
- PotentialVariableDeclarationFunction should consider static scopes. (PR: #1536)
- Fix issue with recursively defined annotation in shadow class. (PR: #1711)
- Remove an hardcoded encoding value in CompilationUnitWrapper. (PR: #1544)
- SetSimpleName of CtRootPackage if now fail-silent to simplify client code. (PR: #1523)
- File resource leak in pretty printing. (PR: #1521)
- Bump commons-io version. (PR: #1530)
- prettyprinter
- role
- template
- Relax template parameter constraint. (PR: #1535)
Refactoring
⚠️ [BREAKING] Get rid of snapshotLength and hasNewContent. (PR: #1576)⚠️ [BREAKING] CompilationUnit#create renamed to getOrCreate. (PR: #1645)⚠️ [BREAKING] CtModifiable add/removeModifier stick to convention on returned object. (PR: #1706)⚠️ [BREAKING] Remove ant related code and dependency. (PR: #1540)⚠️ [BREAKING] Move ElementPrinterHelper to the appropriate package. (PR: #1551)⚠️ [BREAKING] GetBoundingType returns Object by default. (PR: #1672)- All non-leaf interfaces of the metamodel should be visited by CtInheritanceScanner. (PR: #1703)
- Remove replace methods which pollute code completion and do not provide additional behavior. (PR: #1704)
- Move package
spoon.generating.*
from src/main to src/test. (PR: #1647) - Introduce CommentHelper, LiteralHelper and OperatorHelper. (PR: #1525)
- Compute CtRole#forName automatically based on enum value names. (PR: #1702)
- PrinterHelper prints tabs automatically. (PR: #1566)
- DefaultJavaPrettyPrinter better uses OperatorHelper. (PR: #1553)
- Delete old/useless config files. (PR: #1548)
- Launcher#buildModel returns a CtModel. (PR: #1549)
- Add constant for code compliance level. (PR: #1543)
- Test code assumes java 8 compliance so as to allow lambdas in spoon code. (PR: #1539)
- Use LiteralHelper in DefaultJavaPrettyPrinter. (PR: #1529)
- modifier: CreateCtModifierHandler that handles the modifiers. (PR: #1677)
- role
Performance
- MainTest#checkModelIsTree needs less memory. (PR: #1596)
- Avoid slow CCE. Check acceptable type when possible. (PR: #1541)
Tests
- Add a test about the behavior of PropertySetter. (PR: #1612)
- SpoonMetaModel checks whether provided model is complete. (PR: #1714)
- Add an architectural test to catch package creation during code review. (PR: #1696)
- Fix typo in MMType. (PR: #1708)
- Check that CtComment works with \r separator. (PR: #1679)
- Add explicit Spoon metamodel to facilitate consistency checks and code generation. (PR: #1627)
- Declares missing packages for new architecture enforcing test. (PR: #1710)
- Adds a test on roles for CtReference fields. (PR: #1601)
- Don't use Junit3 classes in test suite, only use Junit4 org.junit.*. (PR: #1577)
- Add a test to verify an important contract of setParent. (PR: #1591)
- Add a new test to check if static imports are placed after type imports. (PR: #1572)
- Enforce test naming discipline. (PR: #1554)
- The ant dependency was removed so the test should be changed. (PR: #1547)
- Fix test assertion with JDK8 1.8.0_15 on Travis. (PR: #1718)
- Refactor: Faster test execution. (PR: #1552)
Documentation
- Improve getting started. (PR: #1676)
- Clarify CtType#getAllMethods documentation. (PR: #1644)
- End-of-life for mailing list spoon-discuss. (PR: #1643)
- Clarifies contracts of @DerivedProperty. (PR: #1613)
- Move around some documentation items for easier finding. (PR: #1564)
- Add recent papers that use Spoon. (PR: #1556)
- Update version number after the new release 5.9.0. (PR: #1517)
Other
- Change Revapi template to have class name shortening by a bunch of Freemarker macros. (PR: #1697)
- Revapi reports are smaller on screen to save space on the corresponding Github page. (PR: #1692)
- Revapi now deletes its own comments before commenting. (PR: #1683)
- Improve Travis configuration for parallel jobs. (PR: #1655)
- Bump revapi version. (PR: #1665)
- Upgrade to org.eclipse.tycho:org.eclipse.jdt.core:3.13.0. (PR: #1492)
- Now depends on Java8/JDK8. (PR: #1528)
- maven: Remove maven reporting plugins that we never use. (PR: #1560)
- Prepare for next development iteration.
Authors
Name | Nb Commit |
---|---|
Simon Urli | 49 |
Pavel Vojtechovsky | 44 |
Martin Monperrus | 22 |
Thomas Durieux | 4 |
tiagodrcarvalho | 1 |
Lukas Krejci | 1 |
spoon-core-5.9.0
Spoon release on this back-to-work times!
Thanks to all contributors 👍
Changelog
New features
- Introduce NamedElementFilter (because NameFilter is ill-designed). (PR: #1500)
- In auto-import mode, imports from original source code are reused. (PR: #1499)
- Add automatically generated comments in template-produced code. (PR: #1465)
- Add support for short pretty-printing of annotation value when appropriate. (PR: #1485)
- prettyprinter: DefaultJavaPrettyPrinter#setLineSeparator(String). (PR: #1490)
Bug Fixes
- Fix a stack overflow when calling getDeclaration in noclasspath. (PR: #1515)
- Fix issue related to processing generic types. (PR: #1504)
- Fix NPE in noclasspath mode. (PR: #1502)
- Compute positions of elements. (PR: #1493)
- Support substitution of references to target type in inner type. (PR: #1477)
- setInputClassloader: Bug when using a URLClassLoader with standard URLs. (PR: #1507)
- comment: Splitting of comment by EOL. (PR: #1455)
- template: Object is not an template parameter implicitly. (PR: #1461)
- reference: Fix getReference of an unknown class that has the same name as an existing class. (PR: #1480)
Documentation
- Update usage of maven plugin to latest version 2.5. (PR: #1508)
- Remove information about deleted stable branch. (PR: #1474)
- release: Update release information in documentation. (PR: #1471)
Refactoring
- Encoding is correctly handled in Environment. (PR: #1498)
- Deprecate PrettyPrinter#getPackageDeclaration. (PR: #1489)
- printer: Remove deprecated method from PrinterHelper. (PR: #1472)
Performance
- Compile comments only if needed. (PR: #1487)
- Collect list of source files only once. (PR: #1486)
- No call to expensive toString in DoNotFurtherTemplateThisElement. (PR: #1478)
Tests
- Fix CtRenameLocalVariableRefactoringTest#testRenameAllLocalVariablesOfRenameTestSubject. (PR: #1491)
Community
- @pvojtechovsky gets merge honor and responsibility. (PR: #1468)
Other
- Fix pom.xml to allow deploying snapshots. (PR: #1495)
- Prepare for next development iteration.
Authors
Name | Nb Commit |
---|---|
Pavel Vojtechovsky | 11 |
Simon Urli | 10 |
Wreulicke | 1 |
Marcel Steinbeck | 1 |
Lionel Seinturier | 1 |
Thomas Durieux | 1 |
Jan Galinski | 1 |
Martin Monperrus | 1 |
spoon-core-5.8.0
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
- 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
- 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 |