Changes between Version 157 and Version 158 of j2p


Ignore:
Timestamp:
11/11/24 15:16:19 (3 weeks ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v157 v158  
    475475||It seems the python code uses the wrong values in my lambda expression||There is a subtle but essential scoping difference between java and python. In python, a local variable continues living even if it goes outside of scope and can be changed. The lambda will use the latest value assigned to the variable. To copy the current value, consider creating the lambda in a dedicated method||
    476476||I get UnsupportedOperationException ... ResolvedWildcard||This happens sometimes in complex method calls with complex parameters. Usually this happens in a stream() context. We suggest using manual translation in such case||
     477||I get {{{No translator found for java.util.stream.Stream}}}||Stream translation is quite complex and currently not supported. Either use a loop in java, or manually translate using #PY||
    477478||I get {{{Inner classes can not be translated}}}||Check the section on [wiki:j2p#Innerclasses inner classes]||
    478479||I get something like {{{from com.X.Y.Z import Z: ModuleNotFoundError: No module named 'com'}}}. {{{com.X.Y.Z}}} is a java package that does not exist in python. ||You did not provide  a library or code translate {{{com.X.Y.Z}}} and the translator now uses a "stub" translator that assumes the package on the python side is identical. To fix, you have to add a translator for the {{{com.X.Y.Z}}} package. Or avoid using the package in java||