mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-16 17:14:41 +02:00
8233785: Incorrect JDK version is reported in hs_err log
Reviewed-by: dholmes, stuefe
This commit is contained in:
parent
0c1f972f4a
commit
a05b6ae866
1 changed files with 5 additions and 5 deletions
|
@ -733,6 +733,7 @@ int JDK_Version::compare(const JDK_Version& other) const {
|
|||
return (e > o) ? 1 : ((e == o) ? 0 : -1);
|
||||
}
|
||||
|
||||
/* See JEP 223 */
|
||||
void JDK_Version::to_string(char* buffer, size_t buflen) const {
|
||||
assert(buffer && buflen > 0, "call with useful buffer");
|
||||
size_t index = 0;
|
||||
|
@ -744,13 +745,12 @@ void JDK_Version::to_string(char* buffer, size_t buflen) const {
|
|||
&buffer[index], buflen - index, "%d.%d", _major, _minor);
|
||||
if (rc == -1) return;
|
||||
index += rc;
|
||||
if (_security > 0) {
|
||||
rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _security);
|
||||
if (_patch > 0) {
|
||||
rc = jio_snprintf(&buffer[index], buflen - index, ".%d.%d", _security, _patch);
|
||||
if (rc == -1) return;
|
||||
index += rc;
|
||||
}
|
||||
if (_patch > 0) {
|
||||
rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _patch);
|
||||
} else if (_security > 0) {
|
||||
rc = jio_snprintf(&buffer[index], buflen - index, ".%d", _security);
|
||||
if (rc == -1) return;
|
||||
index += rc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue