Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Godin
Copy link
Member

@Godin Godin commented Dec 16, 2024

Prior to #1810

Screenshot 2024-12-16 at 23 15 52

However after

Screenshot 2024-12-16 at 23 15 17
  public static final java.lang.String example(org.example.A);
    descriptor: (Lorg/example/A;)Ljava/lang/String;
    flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
    Code:
      stack=2, locals=4, args_size=1
         0: aload_0
         1: dup
         2: ifnull        27
         5: astore_1
         6: aload_1
         7: astore_2
         8: iconst_0
         9: istore_3
        10: invokestatic  #16                 // Method exception:()V
        13: aload_1
        14: invokevirtual #22                 // Method org/example/A.getB:()Lorg/example/B;
        17: dup
        18: ifnull        27
        21: invokevirtual #28                 // Method org/example/B.getC:()Ljava/lang/String;
        24: goto          29
        27: pop
        28: aconst_null
        29: areturn

branch 0 of ifnull instructions of a chain should not be replaced.

@Godin Godin self-assigned this Dec 16, 2024
@Godin Godin force-pushed the kotlin_safe_call_chain_exception branch from 870c92a to 9398adb Compare December 16, 2024 22:48
@Godin Godin force-pushed the kotlin_safe_call_chain_exception branch from 9398adb to f5aa0a0 Compare January 14, 2025 21:27
@Godin Godin force-pushed the kotlin_safe_call_chain_exception branch from f5aa0a0 to c6b309c Compare April 11, 2025 13:19
@Godin Godin moved this from To Do to In Progress in Filtering Apr 11, 2025
@Godin Godin added this to the 0.8.14 milestone Apr 11, 2025
@Godin Godin force-pushed the kotlin_safe_call_chain_exception branch from c6b309c to 8044ee9 Compare April 12, 2025 19:21
@Godin Godin marked this pull request as ready for review April 12, 2025 19:56
@Godin Godin requested a review from leveretka April 12, 2025 19:56
Copy link
Collaborator

@leveretka leveretka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@Godin Godin merged commit c3009f1 into jacoco:master Apr 15, 2025
35 checks passed
@Godin Godin deleted the kotlin_safe_call_chain_exception branch April 15, 2025 21:12
@github-project-automation github-project-automation bot moved this from In Progress to Done in Filtering Apr 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants