[
https://issues.apache.org/jira/browse/HDFS-15927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Íñigo Goiri resolved HDFS-15927.
--------------------------------
Fix Version/s: 3.4.0
Hadoop Flags: Reviewed
Resolution: Fixed
> 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
> Labels: pull-request-available
> Fix For: 3.4.0
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> 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]