fasten icon indicating copy to clipboard operation
fasten copied to clipboard

The id generated for a Java class without any package contains "null"

Open tmortagne opened this issue 4 years ago • 4 comments

To Reproduce

Analyze a java class MyClass with no package: you end up with a JSON containing:

"internalTypes": {"/null/MyClass": {

in the produced JSON.

Expected behavior

I feel that en empty string (so "//MyClass") would make more sense than "null".

tmortagne avatar Nov 25 '20 12:11 tmortagne

I would argue that the correct type for classes in the default package should be /MyClass.

@ashkboos The issue report is quite old by now... how has the handling been changed in the meantime?

proksch avatar Jan 30 '22 00:01 proksch

Please make sure that this is not forgotten... please also consider #248 and #260 as all of them are related to FastenURIs.

proksch avatar Mar 10 '22 14:03 proksch

@proksch I thought about these issues a lot. All of them are somehow related to the FastenUris design. We can perhaps spend some time and do some workarounds to hide them but I'm not sure it is worth the time. I think a proper solution is as you mentioned an ANTLR-based solution or sth similar.

ashkboos avatar Mar 10 '22 15:03 ashkboos

Can you make an example? Which constructs cannot be expressed in a FastenUri?

proksch avatar Mar 10 '22 15:03 proksch