Skip to content

Commit ebd3781

Browse files
committed
GH-524 use s[1] if s[0] is empty
1 parent c269100 commit ebd3781

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

visualvm/jfr/src/org/graalvm/visualvm/jfr/views/environment/EnvironmentViewSupport.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,8 @@ private static String formatOSInfo(String os) {
138138
if (s[0].startsWith("Bsduname:")) s[0] = s[0].substring("Bsduname:".length()).trim(); // NOI18N
139139
if (s[0].startsWith("DISTRIB_ID=")) s[0] = s[0].substring("DISTRIB_ID=".length()).trim(); // NOI18N
140140

141+
if (s[0].isEmpty() && s.length >= 2) s[0] = s[1];
142+
141143
int i = s[0].indexOf(';'); // NOI18N
142144
if (i > 0) s[0] = s[0].substring(0, i).trim();
143145

0 commit comments

Comments
 (0)