Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions java/client/src/main/java/io/vitess/client/cursor/FieldMap.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/*
* Copyright 2017 Google Inc.
*
*
* Licensed 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.
Expand All @@ -20,12 +20,12 @@
import static com.google.common.base.Preconditions.checkNotNull;

import com.google.common.collect.ImmutableList;
import io.vitess.proto.Query.Field;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
import org.apache.commons.collections4.map.CaseInsensitiveMap;

import io.vitess.proto.Query.Field;

/**
* A wrapper for {@code List<Field>} that also facilitates lookup by field name.
Expand Down Expand Up @@ -58,11 +58,11 @@ public FieldMap(Iterable<Field> fields) {
labelMap.put(columnLabel, columnIndex);
}
String origName = field.getOrgName();
if (origName != null && !"".equals(origName) && !nameMap.containsKey(origName)) {
if (!"".equals(origName) && !nameMap.containsKey(origName)) {
nameMap.put(origName, columnIndex);
}
String tableName = field.getTable();
if (tableName != null && !"".equals(tableName)) {
if (!"".equals(tableName)) {
StringBuilder fullNameBuf = new StringBuilder();
fullNameBuf.append(tableName);
fullNameBuf.append('.');
Expand Down