summaryrefslogtreecommitdiffstats
path: root/vespajlib
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-12-06 09:01:41 -0800
committerJon Bratseth <bratseth@verizonmedia.com>2019-12-06 09:01:41 -0800
commit8c8d1a33eb1eaf7d7029e2974bc1e8c6da629283 (patch)
tree77fa6a32ce5cc2af0f9404c3e255e677199c7c14 /vespajlib
parent984663d50bd1e50be6a705b726604aea3709e7c3 (diff)
Rename private field
Diffstat (limited to 'vespajlib')
-rw-r--r--vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java b/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
index 556eec6174e..52256293a5b 100644
--- a/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
+++ b/vespajlib/src/main/java/com/yahoo/tensor/TensorAddress.java
@@ -1,10 +1,7 @@
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.tensor;
-import com.google.common.base.Joiner;
-
import java.util.Arrays;
-import java.util.Objects;
import java.util.Optional;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
@@ -163,7 +160,7 @@ public abstract class TensorAddress implements Comparable<TensorAddress> {
/** Supports building of a tensor address */
public static class Builder {
- private Pattern identifierPattern = Pattern.compile("[-,A-Za-z0-9_@]([A-Z,a-z0-9_@$])*");
+ private Pattern labelPattern = Pattern.compile("[-,A-Za-z0-9_@]([A-Z,a-z0-9_@$])*");
private final TensorType type;
private final String[] labels;
@@ -208,7 +205,7 @@ public abstract class TensorAddress implements Comparable<TensorAddress> {
private void requireIdentifier(String s, String parameterName) {
if (s == null)
throw new IllegalArgumentException(parameterName + " can not be null");
- if ( ! identifierPattern.matcher(s).matches())
+ if ( ! labelPattern.matcher(s).matches())
throw new IllegalArgumentException(parameterName + " must be an identifier or integer, not '" + s + "'");
}