You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Currently the source file name is used when generated some of the class names, this causes crashes if it isn't a valid class name in Java.
To Reproduce
ishan@ishan-macbook ~ > cat .testing.obs
main contract Foo { }
ishan@ishan-macbook ~ > obsidianc .testing.obs
org/hyperledger/fabric/example/Contract.java
org/hyperledger/fabric/example/Foo.java
Exception in thread "main" java.lang.IllegalArgumentException: Part '' of the package name 'org.hyperledger.fabric.example..testingOuterClass' is invalid
at com.helger.jcodemodel.JPackage.<init>(JPackage.java:194)
at com.helger.jcodemodel.JCodeModel.lambda$_package$0(JCodeModel.java:226)
at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1133)
at com.helger.jcodemodel.JCodeModel._package(JCodeModel.java:226)
at com.helger.jcodemodel.JDirectClass._package(JDirectClass.java:122)
at com.helger.jcodemodel.writer.JFormatter$NameUsage.isAmbiguousIn(JFormatter.java:127)
at com.helger.jcodemodel.writer.JFormatter.writeClassFull(JFormatter.java:925)
at com.helger.jcodemodel.writer.JCMWriter.buildPackage(JCMWriter.java:324)
at com.helger.jcodemodel.writer.JCMWriter.build(JCMWriter.java:288)
at com.helger.jcodemodel.writer.JCMWriter.build(JCMWriter.java:226)
at com.helger.jcodemodel.writer.JCMWriter.build(JCMWriter.java:198)
at com.helger.jcodemodel.writer.JCMWriter.build(JCMWriter.java:239)
at edu.cmu.cs.obsidian.Main$.compileProgram(Main.scala:348)
at edu.cmu.cs.obsidian.Main$.compileProgram(Main.scala:247)
at edu.cmu.cs.obsidian.Main$.main(Main.scala:239)
at edu.cmu.cs.obsidian.Main.main(Main.scala)
The text was updated successfully, but these errors were encountered:
Describe the bug
Currently the source file name is used when generated some of the class names, this causes crashes if it isn't a valid class name in Java.
To Reproduce
The text was updated successfully, but these errors were encountered: