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

Gautham Banasandra updated HDFS-15927:
--------------------------------------
    Description: 
Need to catch polymorphic exception types by reference in order to realize the 
polymorphic usage, if any. Otherwise, the functionality of the caught object is 
restricted to only that of the base class.

Also, the following warning gets reported since it's currently caught by value -
{code:java}
[WARNING] 
/home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:138:22:
 warning: catching polymorphic type 'const class hdfs::uri_parse_error' by 
value [-Wcatch-value=]
[WARNING] 
/home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:151:27:
 warning: catching polymorphic type 'struct hdfs::ha_parse_error' by value 
[-Wcatch-value=]
{code}

  was:
Need to catch polymorphic exception types by reference in order to realize the 
polymorphic usage, if any.

Also, the following warning gets reported since it's currently caught by value -
{code}
[WARNING] 
/home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:138:22:
 warning: catching polymorphic type 'const class hdfs::uri_parse_error' by 
value [-Wcatch-value=]
[WARNING] 
/home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:151:27:
 warning: catching polymorphic type 'struct hdfs::ha_parse_error' by value 
[-Wcatch-value=]
{code}


> Catch polymorphic type by reference
> -----------------------------------
>
>                 Key: HDFS-15927
>                 URL: https://issues.apache.org/jira/browse/HDFS-15927
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: libhdfs++
>    Affects Versions: 3.4.0
>            Reporter: Gautham Banasandra
>            Assignee: Gautham Banasandra
>            Priority: Major
>
> Need to catch polymorphic exception types by reference in order to realize 
> the polymorphic usage, if any. Otherwise, the functionality of the caught 
> object is restricted to only that of the base class.
> Also, the following warning gets reported since it's currently caught by 
> value -
> {code:java}
> [WARNING] 
> /home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:138:22:
>  warning: catching polymorphic type 'const class hdfs::uri_parse_error' by 
> value [-Wcatch-value=]
> [WARNING] 
> /home/jenkins/jenkins-agent/workspace/hadoop-multibranch_PR-2792/src/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfspp/lib/common/hdfs_configuration.cc:151:27:
>  warning: catching polymorphic type 'struct hdfs::ha_parse_error' by value 
> [-Wcatch-value=]
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to