7.17.0 #1311
7.17.0
#1311
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
New Java Type Cache
One of the strengths of OpenRewrite is that its tree elements include semantic type information. In the case of the Java parser, type attribution is achieved by mapping type information from the Javac compiler into Rewrite's Java-type system. In previous versions of Rewrite, the framework used the flyweight pattern to cache the type information and promote referential de-duplication. The flyweights prevented memory exhaustion and reduced the size of serialized ASTs. An additional feature of Rewrite's Java-type system was that it would artificially break cycles by introducing a Cyclic reference.
As the library has evolved (and we have started collecting more type information), it has exposed limitations and gaps within the legacy type system. This release introduces a new Java Type caching system that is better suited to large-scale, automated refactoring. Most of the changes are "behind-the-scenes" and lead to a much more accurate type-attribution system.
Other Enhancements
Map
notation for Gradle dependency declarations 2802d60Fixes
XmlParser
throws NPE when parsing a DTC without anexternalId
XmlParser throws NPE when parsing a DTC without an externalId #1150JsonParserVisitor
parses longs withparseInt
JsonParserVisitor parses longs with parseInt. #1145SourceFile
are accepted by visitors. Scope which types ofSourceFile
are accepted by visitors #1151ChangePackage.updateType
is never called ChangePackageupdateType
is never called #1140MissingOverrideAnnotation
Mismatched parenthesis in MissingOverrideAnnotation #1153AddImport
should not addjava.lang
to classes including classes in the default package AddImport should not add java.lang to classes including classes in the default package #1158 AddImports adds java.lang.* imports within default packages #1156Anchor
andAlias
models to YAML, and alias support forYaml.Scalar
values. Add Anchor and Alias models to Yaml, and alias support for Yaml.Scalar values. #1155AddImport
7007421JavaTemplate
method argument substitution and Java8 type mapping cad4aed 9ab35a9UpgradeParentPom
may downgrade versions UpgradeParentPom may downgrade versions #1107Xml.Document
, it is transformed into aMaven
with an empty model If a Maven visitor successfully changes a non-Maven Xml.Document, it is transformed it into a a Maven with an empty model #1167ChangeMethodTargetToStaticVisitor
to remove potential namespace conflicts. 2be7989BlankLinesVisitor
fefdc00 35bb53fAutoFormat
always formats maven poms with 4 space indentation Xml AutoFormat always formats maven poms with 4 space indentation #1186AddPlugin
to correctly format any executions/configuration/dependencies Enhance Maven AddPlugin to correctly format any executions/configuration/dependencies #1187YamlParser
throwsEmptyStackException
YamlParser throws EmptyStackException #1180LatestRelease
to support timestamped suffixes 5503aacsrc/main/java/org/openrewrite/concourse/ChangeValue.java
#1173FindProperties
in rewrite-properties missingvisitMarkers
FindProperties in rewrite-properties missing visitMarkers #1195FindProperties
should have a marker on the value, same as YAML and other search results FindProperties should have marker on the value, same as yaml and other search results #1196EmptyBlockVisitor
ef074f5NoValueOfOnStringType
removes necessary call to String#valueOf in string concatenation NoValueOfOnStringType removes necessary call to String#valueOf in string concatenation #1200MethodNameCasing
should not rename overridden methods by MethodNameCasing should not rename overridden methods #1217Autodetect
counts prefixes with neither tabs nor spaces as spaces Autodetect counts prefixes with neither tabs or spaces as spaces #1221UnnecessaryExplicitTypeArguments
can lead to uncompilable code due to introduced ambiguity UnnecessaryExplicitTypeArguments can lead to uncompilable code due to introduced ambiguity #1211MinimumSwitchCases
should prepend enum class to values or statically import them MinimumSwitchCases should prepend enum class to values or statically import them #1212AutoFormat
under-indents tag values Xml AutoFormat under-indents tag values #1189NestedEnumsAreNotStatic
reformats whole enum #1222IndexOfChecksShouldUseAStartPosition
should ignore cases where the start position is undefined and the index expected to be greater than 0 IndexOfChecksShouldUseAStartPosition should ignore cases where the start position is undefined and the index expected to be greater than 0 #1225UnnecessaryThrows
removesthrows
from the parent class and breaks subclasses overriding methods UnnecessaryThrows removes throws from parent class and breaks subclasses overriding methods #1207OrderPomElements
. Preserve new line layout of pom's reordered by OrderPomElements. #1230MethodMatcher
should acknowledgematchOverrides
MethodMatcher should acknowledge matchOverrides #1219Class.forName
for primitives inMethodMatcher
, bettertoString
onJavaType
ChangeMethodAccessLevel
should pass onmatchOverrides
ChangeMethodAccessLevel should pass on matchOverrides #1240<?m2e ...?>
tag results extraneous input warning when parsing pom<?m2e ...?>
tag results extraneous input warning when parsing pom #1243null
as type #1246VersionRangeParser
#1250RocksdbMavenPomCache
can lead to heap exhaustion. #1284Full Changelog: v7.16.0...v7.17.0
This discussion was created from the release 7.17.0.
Beta Was this translation helpful? Give feedback.
All reactions