JavaParser v3.16.0 Release Notes

Release Date: 2020-05-24 // almost 4 years ago
  • ๐Ÿ“œ issues resolved

    ๐Ÿš€ There are two breaking changes within this release. โฌ†๏ธ If you would like assistance with upgrading, get in touch.

    • ๐Ÿ›  FIXED: Edits to the value of a string value are now correctly handled for use with Lexical Preservation (PR #2646, by @lemoncurry)
    • ๐Ÿ›  FIXED: Edits to the value of other literal values also now handled (PR #2679, by @MysterAitch)
    • ๐Ÿ’ฅ BREAKING CHANGE: Tokens relating to literal values now have the category of JavaToken.Category.LITERAL (previously JavaToken.Category.KEYWORD) (PR #2679, by @MysterAitch)
    • ๐Ÿ›  FIXED: Add symbol solver support for variadic parameters given zero or more than one argument, and when an array is given (PR #2675, by @hfreeb)
    • ๐Ÿ”„ CHANGED: Added the keyword synchronized to JavaParserFacade#get. This is specifically in response to #2668 - JavaParser is not otherwise threadsafe.
      (PR #2694, by @MysterAitch)
    • BREAKING CHANGE: The following methods now return Optional<> (as do all classes which implement/extend them): ResolvedClassDeclaration#getSuperClass(), ResolvedReferenceType#getTypeDeclaration().
      Note that Converting to use optional should be as simple as adding .get(), given that any cases where returning Optional.empty() causes problems would have also previously triggered a NullPointerException. You might also use .orElseThrow().
      (PR #2693, by @MysterAitch)
    • ๐Ÿšš CHANGED: Added some temporary logic to allow tests to use slightly different expected results based on the version of java used (e.g. java.lang.Object.registerNatives() removed in JDK14)
      (PR #2637, by @EFregnan)
    • ๐Ÿ›  FIXED: Fix resolving overloaded methods of external types
      (PR #2687, by @maartenc)
    • ๐Ÿ›  FIXED: Fix resolving method references on expressions other than ReferenceType::methodname
      (PR #2674, by @maartenc)