Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Command Line debugging fails to trace back to single line if statement #1173
Refer to Issue #882 to see changes made for command line debugging. (See ignored test testbed/test/cruise.runtime.RuntimeErrorOutputTests.BeforeAfterCustomInOriginal())
When generating Java from Umple code, if there is code to be injected before a return statement that is surrounded by braces on a single line (in an if statement, for example), then the outputted Java creates new lines for each bracket and the return statement. While this creates more readable code, it breaks the run-time command line debugging if the return statement happens to have a run-time error in it. The reason for this is that the translation from Java line numbers back to Umple line numbers no longer line up due to the extra new lines added.
Minimum Steps to Reproduce
Running the above code should give the following console error:
I suggest you start by looking into the file UmpleToJava/UmpleTLTemplates/class_MethodDeclaration.ump inside the statement: