Inconsistent results from GraphLayout vs GraphStats

Sebastian Zarnekow sebastian.zarnekow at gmail.com
Sun Jan 29 16:14:33 UTC 2023


Hi,

I tried to find a way to submit a bug report but failed to do so.
Apparently, issues are not enabled on the GitHub repository - contrary to
what is mentioned in the readme.md.

Maybe this mailing list is the right channel to discuss my observations:

>From my understanding, the results of GraphLayout.totalSize and
GraphStats.totalSize should be the same for a given object graph. However,
there is some inconsistency. The following test case fails for me. I'm not
sure if that's a misunderstanding on my end or a bug in the processing of
arrays:

@Test

*public* *void* statsVsLayout() {

Object[] objects = *new* Object[1];

objects[0] = *new* String[0];

GraphLayout layout = GraphLayout.*parseInstance*(*new* Object[] { objects }
);

GraphStats stats = GraphStats.*parseInstance*(*new* Object[] { objects });

*assertEquals*(layout.totalSize(), stats.totalSize());

*assertEquals*(layout.totalCount(), stats.totalCount());

}




Best
Sebastian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/jol-dev/attachments/20230129/94f2d6bc/attachment-0001.htm>


More information about the jol-dev mailing list