GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Parse and expose nullability of types for use in recipes · Issue #3221 · openrewrite/rewrite Open Labels DescriptionKotlin quite clearly has explicit nullability, but some Java projects can somewhat express the same with nullability annotations. In addition to that we can deduce nullabillity once for instance a method has been called on an object. It would be great if we could capture and expose this information through our type system, such that recipes can query this when inserting code snippets. Notably this came up recently in apache/maven-pmd-plugin#124 (comment), where we want to forgo adding null checks where they are not needed. Ideally this is something we determine ahead of time, even if limited. Once exposed we can also write clean up recipes that remove excessive null checks. Even if we start small (for instance only looking at Kotlin types, or some nullability annotations, then we can gradually expand this over time, to bring more value to repeatedly running recipes that use this information. I've not looked at implementation specifics yet, merely discussed this with Knut as it came up recently for Kotlin on Slack. Activity
MetadataMetadataAssigneesLabelsTypeProjects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |