1
1
/*******************************************************************************
2
- * Copyright (c) 1991, 2022 IBM Corp. and others
2
+ * Copyright (c) 1991, 2023 IBM Corp. and others
3
3
*
4
4
* This program and the accompanying materials are made available under
5
5
* the terms of the Eclipse Public License 2.0 which accompanies this
@@ -296,6 +296,7 @@ jvmtiGetClassLoaderClasses(jvmtiEnv* env,
296
296
}
297
297
298
298
299
+ #if JAVA_SPEC_VERSION >= 17
299
300
void fixHiddenOrAnonSignature (char * signature , UDATA signatureLength ) {
300
301
if (signatureLength >= (ROM_ADDRESS_LENGTH + 2 )) {
301
302
IDATA lastSeparatorIndex = signatureLength - (ROM_ADDRESS_LENGTH + 2 );
@@ -309,6 +310,7 @@ void fixHiddenOrAnonSignature(char* signature, UDATA signatureLength) {
309
310
}
310
311
}
311
312
}
313
+ #endif /* JAVA_SPEC_VERSION >= 17 */
312
314
313
315
314
316
jvmtiError JNICALL
@@ -382,9 +384,11 @@ jvmtiGetClassSignature(jvmtiEnv* env,
382
384
memcpy (signature + arity + 1 , J9UTF8_DATA (utf ), utfLength );
383
385
signature [allocSize - 1 ] = ';' ;
384
386
387
+ #if JAVA_SPEC_VERSION >= 17
385
388
if (J9ROMCLASS_IS_ANON_OR_HIDDEN (leafType -> romClass )) {
386
389
fixHiddenOrAnonSignature (signature , allocSize );
387
390
}
391
+ #endif /* JAVA_SPEC_VERSION >= 17 */
388
392
}
389
393
signature [allocSize ] = '\0' ;
390
394
} else {
@@ -401,9 +405,11 @@ jvmtiGetClassSignature(jvmtiEnv* env,
401
405
signature [utfLength + 1 ] = ';' ;
402
406
signature [utfLength + 2 ] = '\0' ;
403
407
408
+ #if JAVA_SPEC_VERSION >= 17
404
409
if (J9ROMCLASS_IS_ANON_OR_HIDDEN (clazz -> romClass )) {
405
410
fixHiddenOrAnonSignature (signature , utfLength + 2 );
406
411
}
412
+ #endif /* JAVA_SPEC_VERSION >= 17 */
407
413
}
408
414
}
409
415
0 commit comments