[
https://issues.apache.org/jira/browse/AVRO-3601?focusedWorklogId=800009&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-800009
]
ASF GitHub Bot logged work on AVRO-3601:
----------------------------------------
Author: ASF GitHub Bot
Created on: 11/Aug/22 14:42
Start Date: 11/Aug/22 14:42
Worklog Time Spent: 10m
Work Description: KalleOlaviNiemitalo commented on code in PR #1821:
URL: https://github.com/apache/avro/pull/1821#discussion_r943572007
##########
lang/c++/impl/CustomAttributes.cc:
##########
@@ -0,0 +1,51 @@
+
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "CustomAttributes.hh"
+#include <map>
+#include <memory>
+#include "Exception.hh"
+
+namespace avro {
+
+std::string CustomAttributes::getAttribute(const std::string &name) const {
+ std::map<std::string, std::string>::const_iterator iter =
+ attributes_.find(name);
+ if (iter == attributes_.end()) {
+ return NULL;
Review Comment:
Conversion from nullptr to std::string has undefined behavior. Is there a
test case that covers this?
<https://github.com/gcc-mirror/gcc/blob/04ce2400b35225302e0d6883bb0817378180f5d7/libstdc%2B%2B-v3/include/bits/basic_string.h#L634-L640>
Issue Time Tracking
-------------------
Worklog Id: (was: 800009)
Time Spent: 1h 40m (was: 1.5h)
> C++ API header contains breaking include
> ----------------------------------------
>
> Key: AVRO-3601
> URL: https://issues.apache.org/jira/browse/AVRO-3601
> Project: Apache Avro
> Issue Type: Bug
> Reporter: Mike Ruffing
> Assignee: Martin Tzvetanov Grigorov
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Problem file/line:
> https://github.com/apache/avro/blob/master/lang/c%2B%2B/api/CustomFields.hh#L24
> Steps to reproduce:
> * Download AVRO version 1.11.1
> * Execute {{./build.sh install}} (from the {{lang/c++ directory}})
> * Navigate to the installed {{include}} directory
> * Verify this file (and path) {{"../impl/json/JsonDom.hh"}} does NOT exists
> in the installed {{include}} directory
> Relates to: https://issues.apache.org/jira/browse/AVRO-3547
--
This message was sent by Atlassian Jira
(v8.20.10#820010)