Skip to content

Commit

Permalink
Remove the extra module in error msgs
Browse files Browse the repository at this point in the history
Currently we output messages with "because module module com.test does
not read module module hamcrest.core". We insert the pre-pending
"module" when printing out module names in `getModuleNameUTF`.

Fixes eclipse-openj9#12315

Signed-off-by: Tobi Ajila <[email protected]>
  • Loading branch information
tajila committed Apr 6, 2021
1 parent 5b259ae commit 5fb6c49
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions runtime/vm/lookupmethod.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 1991, 2020 IBM Corp. and others
* Copyright (c) 1991, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -1016,10 +1016,8 @@ getModuleNameUTF(J9VMThread *currentThread, j9object_t moduleObject, char *buffe
nameBuffer = buffer;
#undef UNNAMED_MODULE
} else {
#define NAMED_MODULE "module "
nameBuffer = copyStringToUTF8WithMemAlloc(
currentThread, module->moduleName, J9_STR_NULL_TERMINATE_RESULT, NAMED_MODULE, strlen(NAMED_MODULE), buffer, bufferLength, NULL);
#undef NAMED_MODULE
currentThread, module->moduleName, J9_STR_NULL_TERMINATE_RESULT, "", 0, buffer, bufferLength, NULL);
}
return nameBuffer;
}
Expand Down

0 comments on commit 5fb6c49

Please sign in to comment.