File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed
visualvm/jvm/src/com/sun/tools/visualvm/jvm Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -191,16 +191,28 @@ public boolean is15() {
191
191
192
192
public boolean is16 () {
193
193
String ver = getJavaVersion ();
194
- if (ver != null && (ver .startsWith ("1.6." ) || ver .startsWith ("10." ) || ver .startsWith ("11." ))) { // NOI18N
195
- return true ;
194
+ if (ver != null ) {
195
+ if (ver .startsWith ("1.6." )) { // NOI18N
196
+ return true ;
197
+ }
198
+ // HotSpot Express, only vmVersion available
199
+ if (javaVersion == null && (ver .startsWith ("10." ) || ver .startsWith ("11." ))) { // NOI18N
200
+ return true ;
201
+ }
196
202
}
197
203
return false ;
198
204
}
199
205
200
206
public boolean is17 () {
201
207
String ver = getJavaVersion ();
202
- if (ver != null && (ver .startsWith ("1.7." ) || ver .startsWith ("12." ) || ver .startsWith ("13." ) || ver .startsWith ("14." ))) { // NOI18N
203
- return true ;
208
+ if (ver != null ) {
209
+ if (ver .startsWith ("1.7." )) { // NOI18N
210
+ return true ;
211
+ }
212
+ // HotSpot Express, only vmVersion available
213
+ if (javaVersion == null && (ver .startsWith ("12." ) || ver .startsWith ("13." ) || ver .startsWith ("14." ))) { // NOI18N
214
+ return true ;
215
+ }
204
216
}
205
217
return false ;
206
218
}
@@ -215,15 +227,15 @@ public boolean is18() {
215
227
216
228
public boolean is19 () {
217
229
String ver = getJavaVersion ();
218
- if (ver != null && (ver .startsWith ("1.9." ) || (ver .startsWith ("9" )))) { // NOI18N
230
+ if (ver != null && javaVersion != null && (ver .startsWith ("1.9." ) || (ver .equals ( "9" )) || ( ver . startsWith ("9. " )))) { // NOI18N
219
231
return true ;
220
232
}
221
233
return false ;
222
234
}
223
235
224
236
public boolean is100 () {
225
237
String ver = getJavaVersion ();
226
- if (ver != null && (ver .startsWith ("10" ))) { // NOI18N
238
+ if (ver != null && javaVersion != null && (ver .equals ( "10" ) || ver . startsWith ("10. " ))) { // NOI18N
227
239
return true ;
228
240
}
229
241
return false ;
You can’t perform that action at this time.
0 commit comments