Why are the bots not being signaled for redirection to current version, or why are the bots not doing the right thing? Yet another example of how broken search has become?
A search for "StringBuffer javadocs" turns up a random version. "JDK 17 javadocs" hits the mark.
That link that you're calling a "redirect" is just a human readable link, it doesn't have any official semantics so Google would have to really care and code up something specific if it wanted to do the right thing.
I've thought that programmers would be a good market for a specialized search engine: show it your POM file and it automatically gets the right versions of everything.
Unfortunately
https://blog.codinghorror.com/we-dont-use-software-that-cost...