You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "LuJiang (Jira)" <ji...@apache.org> on 2025/03/06 02:00:00 UTC

[jira] [Updated] (FLINK-37427) incorrect NPE message in StandaloneHaServices constructor

     [ https://issues.apache.org/jira/browse/FLINK-37427?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

LuJiang updated FLINK-37427:
----------------------------
    Description: 
The constructor of org.apache.flink.runtime.highavailability.nonha.standalone.StandaloneHaServices currently uses the variable name clusterRestEndpointAddress instead of the string literal "clusterRestEndpointAddress" in the checkNotNull validation for the third parameter. This leads to ambiguous NullPointerException messages (e.g., NullPointerException: null).
{code:java}
public StandaloneHaServices(
        String resourceManagerAddress,
        String dispatcherAddress,
        String clusterRestEndpointAddress)
{    
 this.resourceManagerAddress =             checkNotNull(resourceManagerAddress, "resourceManagerAddress");    
 this.dispatcherAddress = checkNotNull(dispatcherAddress, "dispatcherAddress");     this.clusterRestEndpointAddress =             checkNotNull(clusterRestEndpointAddress, clusterRestEndpointAddress); 
} {code}

  was:
The constructor of org.apache.flink.runtime.highavailability.nonha.standalone.StandaloneHaServices currently uses the variable name clusterRestEndpointAddress instead of the string literal "clusterRestEndpointAddress" in the checkNotNull validation for the third parameter. This leads to ambiguous NullPointerException messages (e.g., NullPointerException: null).
{code:java}
public StandaloneHaServices(
        String resourceManagerAddress,
        String dispatcherAddress,
        String clusterRestEndpointAddress)
{     this.resourceManagerAddress =             checkNotNull(resourceManagerAddress, "resourceManagerAddress");     this.dispatcherAddress = checkNotNull(dispatcherAddress, "dispatcherAddress");     this.clusterRestEndpointAddress =             checkNotNull(clusterRestEndpointAddress, clusterRestEndpointAddress); 
} {code}


> incorrect NPE message in StandaloneHaServices constructor
> ---------------------------------------------------------
>
>                 Key: FLINK-37427
>                 URL: https://issues.apache.org/jira/browse/FLINK-37427
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / RPC
>    Affects Versions: 1.20.0
>         Environment: * flink: 1.20.0
>            Reporter: LuJiang
>            Priority: Not a Priority
>              Labels: easyfix
>   Original Estimate: 5m
>  Remaining Estimate: 5m
>
> The constructor of org.apache.flink.runtime.highavailability.nonha.standalone.StandaloneHaServices currently uses the variable name clusterRestEndpointAddress instead of the string literal "clusterRestEndpointAddress" in the checkNotNull validation for the third parameter. This leads to ambiguous NullPointerException messages (e.g., NullPointerException: null).
> {code:java}
> public StandaloneHaServices(
>         String resourceManagerAddress,
>         String dispatcherAddress,
>         String clusterRestEndpointAddress)
> {    
>  this.resourceManagerAddress =             checkNotNull(resourceManagerAddress, "resourceManagerAddress");    
>  this.dispatcherAddress = checkNotNull(dispatcherAddress, "dispatcherAddress");     this.clusterRestEndpointAddress =             checkNotNull(clusterRestEndpointAddress, clusterRestEndpointAddress); 
> } {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)