Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRename Record to avoid name clash with java.lang.Record #99
Comments
|
The package name is unfortunate. It has been like that for 20+ years, which is why I'm probably not going to change it until it breaks. As for |
|
Regarding the "records" extension: Maybe I am missing something, but I do not see a big problem at the moment. It is not forbidden to use a name of a class, interface, enum or exception of java.lang package in any other package. One still can reference the java.lang item by using the package prefix if needed. Additionally, the java.lang.Record class will only be rarely directly used. Only if one imports the dnsjava classes via a wildcard import problems will occur, but this is a bad practice anyway. A problem could occur due to the new "record" keyword, as the code frequently uses "record" as an identifier. However, the specification tells that it is not a real keyword like "class", but a "restricted" identifier with a special meaning in some contexts. So in respect of the records, I am confident that no big changes need to be made. |
|
Okay, after adding |
|
I'm closing this in favor of @demonti's explanation, the big changes this would cause inside the library and for consumers, as wells as Java 14's release notes: https://bugs.openjdk.java.net/browse/JDK-8236439 |
Java 14 introduces
java.lang.Record. If that name is kept in future Java versions,org.xbill.DNS.Recordshould be renamed to something else (for example,DnsRecord) to avoid having to referenceorg.xbill.DNS.Recordby its fully qualified name on each usage.(While we’re at naming: the package name should be lowercase as uppercase letters indicate a class name.)