-
-
Notifications
You must be signed in to change notification settings - Fork 7
Initial refactoring WIP #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 83.0% 92.3% +9.2%
- Complexity 42 47 +5
==========================================
Files 5 5
Lines 142 104 -38
Branches 20 13 -7
==========================================
- Hits 118 96 -22
+ Misses 12 5 -7
+ Partials 12 3 -9 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
I see. I guess we could go from 11 to 17 now. |
Hi @stefan-ka , this block is never executed: public static void main(String[] args) {
int javaVersion = Runtime.version().feature();
if (Runtime.version().feature() >= REQUIRED_JAVA_VERSION) {
new ContextMapperCLI().run(args);
} else {
System.out.printf("Invalid Java version '%s' (>=%s is required).", javaVersion, REQUIRED_JAVA_VERSION);
System.exit(1);
}
} If you have a lower java version and you try to execute the jar, you will receive the following message: sdk use java 11.0.27-tem
Using java version 11.0.27-tem in this shell.
java -jar build/libs/context-mapper-cli-0.1.0-SNAPSHOT.jar
Error: Se ha producido un error de enlace al cargar la clase principal org.contextmapper.cli.ContextMapperCLI
java.lang.UnsupportedClassVersionError: org/contextmapper/cli/ContextMapperCLI has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 The message about "Invalid Java version" will be not reached in any case. The issue is raised at JVM level. Note: I am trying to simplify the code to increase the Code Coverage BTW :) Juan Antonio |
Hi Juan Antonio Yes, I guess you are right. I just tried to remember why we introduced that... I think we once checked an lower and upper boundary there because Xtext did not support Java versions >17 for some time: #10 But then I removed the upper boundary check and did not realize that the lower boundary check does not make sense. At least when we compile with same source and target version; what we currently do. So, yes, feel free to remove it. Best regards, |
Hi @stefan-ka , The cli development has few classes, can i move all classes to the main package? ![]() Conceptually, the main class has 2 commands and later a bit of logic, but everything could be in the same package:
Can I flat a bit the structure? After that change, we could merge IMHO. :) Juan Antonio |
Sure @jabrena, fine for me. Looks good! Stefan |
Hi @stefan-ka ,
Cheers Juan Antonio |
Features added in the PR: