Add method signatures for JDK >= 11
See original GitHub issueHello, the following methods have been added in or after JDK 11. Would it make sense to consider them?
- JDK 12:
- JDK 15:
For the following methods added in JDK 17 I am not sure if they should be considered. For the Standard In and Out and Error steams it might make sense to use the native / default encoding; though if the other process explicitly specifies an encoding, that should of course be used.
I found these methods using the newly added “New” tab of the Javadoc: https://docs.oracle.com/en/java/javase/17/docs/api/new-list.html (see JDK-8269400).
Maybe that can be useful for you in the future as well.
However, this information is based on the @since tag. So if the JDK authors forget it you will miss APIs. It apparently also only considers direct usage of @since. So if a class is annotated with @since, but its methods are not, then only the class is listed as new.
In case you were not aware of it already, there are also https://github.com/AdoptOpenJDK/jdk-api-diff and https://github.com/marchof/java-almanac/; but for both the output is rather verbose given that mainly newly added methods and contructors are relevant for this project.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)

Top Related StackOverflow Question
I am working on the process to releasea new version with JDK 18 support, so I will look into this today. Adding the signatures should be easy.
Maybe the following < JDK 11 methods should be added as well (probably not worth it to create a separate GitHub issue):
java.util.GregorianCalendar#from(java.time.ZonedDateTime)However, there is no overload taking a
Locale, so maybe it should not be reported then.java.util.ResourceBundle#getBundle(java.lang.String,java.lang.Module)java.beans.beancontext.BeanContextSupport#BeanContextSupport()java.beans.beancontext.BeanContextSupport#BeanContextSupport(java.beans.beancontext.BeanContext)java.io.ByteArrayOutputStream#toString(int)javax.imageio.ImageWriteParam#ImageWriteParam()Not completely sure about this one because it says “It is up to the subclass to set up the instance variables properly”, but the only implementation difference compared to the
ImageWriteParam(Locale)seems to be that thelocalefield is not initialized (and uses the default locale).javax.imageio.plugins.bmp.BMPImageWriteParam#BMPImageWriteParam()java.util.Properties.html#load(java.io.InputStream)Causes issues when Properties stream contains Unicode characters (which are not Unicode-escaped), e.g. when it was saved with
store(Writer, String).Note that the signatures above don’t exactly match the ones used by this project; they have to be adjusted.
In case you are interested, I have written a small CodeQL query which can be used to find callables using default Charset or Locale. You can use it on https://lgtm.com to run against public GitHub projects, for example Apache Commons IO. It might however produce some false positives and have some false negatives.
CodeQL query