Changes between Version 170 and Version 171 of j2p
- Timestamp:
- 11/18/24 16:40:42 (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
j2p
v170 v171 534 534 ||Everything compiles fine but I get {{{ImportError: cannot import name ... from partially initialized module}}} when running in python ||Typically this happened if your java code has a cyclic reference: class A refers to B and class B refers to A. Python can not handle such cyclic references. We suggest using the {{{@Defer}}} annotation to help the translator, or to refactor the code.|| 535 535 ||My java for loop seems to be translated to a weird looking while loop||That's correct. The java for loop is quite special, and you can use continue and break statements inside it that require us to do some tricks|| 536 ||I get {{{UnsolvedSymbolException ...... Method '...' cannot be resolved in context ...}}} from the javaparser||The javaparser has problems resolving the method when the provided argument does exactly not match the actual argument, eg when your method call uses an int while the actual method takes a long. Try changing your call so that the argument type is exactly matching the method type.||537 ||I get UnsolvedSymbolException{context='null', name='We are unable to find the method declaration corresponding to ...||See the previous issue.||536 ||I get {{{UnsolvedSymbolException ...... Method '...' cannot be resolved in context ...}}} with a long stacktrace pointing to the javaparser||The javaparser has problems resolving the method when the provided argument does exactly not match the actual argument, eg when your method call uses an int while the actual method takes a long. It may help to change your call so that the argument type is exactly matching the method type. || 537 ||I get {{{UnsolvedSymbolException{context='null', name='We are unable to find the method declaration corresponding to ...}}}||See the previous issue.|| 538 538 ||I get an error in python on an overloaded method ({{{@dispatch}}}), incorrect number of arguments.||{{{@dispatch}}} has a problem with Optional arguments. Try making the arguments {{{@NonNull}}} in java.|| 539 539 ||I get an {{{UnsupportedOperationException}}} inside javaparser LambdaExprContext||Javaparser seems to sometimes have trouble with resolving argument types inside lambda expressions. Try explicitly typing the left side of your lambda expression||