Hi,
I just updated to Lyo Code Generator 4.0.0.201911060911.
When I now generate my code, in my "ServletListener", the following
get's generated:
private static String generateBasePath(final ServletContextEvent servletContextEvent, String basePathEnvKey, String basePathContextPropertyKey, String fallbackBase) {
String base = getBasePathFromEnvironment(basePathEnvKey).orElseGet(() -> getBasePathFromContext(servletContextEvent, basePathContextPropertyKey).orElseGet(() -> fallbackBase));
UriBuilder builder = UriBuilder.fromUri(base);
return builder.path(servletContextEvent.getServletContext().getContextPath()).build().toString();
}
Unfortunately, my Server is still on JDK 1.7 (I'll ask for an
update, but I don't know if this will be possible). Lambdas are only
for JDK > 1.7, and thus this breaks my code generation. With
eclipse I can easily transform it back, but it is regenerated every
time...
And I had to CreationDialogs defined, but the generated code
resulted in multiple Compile errors in eclipse: in the FromHTML
there where some "new URI...", and the compiler complained about
missing URI...Exceptions. I cant remember exactly, because I deleted
the Dialogs to fix this, since I don't need them...
Best
Jan-Patrick
--
Dipl. Inform. Jan-Patrick Osterloh
Senior Research Engineer
Human Centered Design Group
OFFIS e.V. - Institut für Informatik | Institute for Information Technology
FuE Bereich Verkehr | R&D Division Transportation
Escherweg 2, 26121 Oldenburg - Germany
Room: D107
Phone/Fax: +49 441 97 22-524 / -502
E-Mail: osterloh@xxxxxxxx
URL: http://www.offis.de
Registergericht: Amtsgericht Oldenburg VR 1956
Vorstand: Prof. Dr.-Ing. Wolfgang H. Nebel (Vorsitzender),
Prof. Dr. techn. Susanne Boll-Westermann,
Prof. Dr.-Ing. Axel Hahn,
Prof. Dr.-Ing. Andreas Hein,
Prof. Dr. Sebastian Lehnhoff
Unsere Hinweise zum Datenschutz sind abrufbar unter:
https://www.offis.de/datentransparenz.html
|