Gabriel39 commented on code in PR #71031: URL: https://github.com/apache/doris/pull/71031#discussion_r4752756932
########## fe/fe-connector/fe-connector-iceberg/src/main/java/org/apache/doris/connector/iceberg/IcebergGoogleCredentialValidator.java: ########## @@ -0,0 +1,59 @@ +// 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. + +package org.apache.doris.connector.iceberg; + +import com.google.api.client.json.GenericJson; +import com.google.api.client.json.JsonObjectParser; +import com.google.api.client.json.gson.GsonFactory; + +import java.io.IOException; +import java.io.StringReader; +import java.util.Map; + +/** Checks the JSON fields the Google SDK consumes without resolving credential sources. */ +final class IcebergGoogleCredentialValidator { + private IcebergGoogleCredentialValidator() { + } + + static void validate(Map<String, String> properties) { + String json = properties.get("gcp.auth.credentials-json"); + if (json == null) { Review Comment: Previously fixed in 1bf25f579979ca42984812b44e9636dfe6376363. Freshly verified on 6dbc3128951a143f5131e0fed6466017394a14fb: the CREATE, ALTER and runtime property-validation cases preserve empty inline JSON with credential-file or ADC configuration. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
