Skip to content

Commit bb572f7

Browse files
committed
adding license headers
1 parent 96887d7 commit bb572f7

File tree

2 files changed

+40
-4
lines changed

2 files changed

+40
-4
lines changed

server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/GeoHashGridValuesSourceBuilder.java

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package org.elasticsearch.search.aggregations.bucket.composite;
221

322
import org.elasticsearch.common.ParseField;
@@ -57,7 +76,6 @@ public GeoHashGridValuesSourceBuilder shardSize(int shardSize) {
5776
return this;
5877
}
5978

60-
6179
@Override
6280
protected void innerWriteTo(StreamOutput out) throws IOException {
6381
out.writeInt(precision);
@@ -77,7 +95,7 @@ String type() {
7795

7896
@Override
7997
public int hashCode() {
80-
return Objects.hash(super.hashCode(), precision);
98+
return Objects.hash(super.hashCode(), precision, shardSize);
8199
}
82100

83101
@Override
@@ -86,10 +104,9 @@ public boolean equals(Object obj) {
86104
if (obj == null || getClass() != obj.getClass()) return false;
87105
if (super.equals(obj) == false) return false;
88106
GeoHashGridValuesSourceBuilder other = (GeoHashGridValuesSourceBuilder) obj;
89-
return Objects.equals(precision, other.precision);
107+
return precision == other.precision && shardSize == other.shardSize;
90108
}
91109

92-
93110
@Override
94111
protected CompositeValuesSourceConfig innerBuild(SearchContext context, ValuesSourceConfig<?> config) throws IOException {
95112
ValuesSource orig = config.toValuesSource(context.getQueryShardContext());

server/src/main/java/org/elasticsearch/search/aggregations/bucket/composite/GeohashValuesSource.java

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
/*
2+
* Licensed to Elasticsearch under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
120
package org.elasticsearch.search.aggregations.bucket.composite;
221

322
import org.apache.lucene.index.LeafReaderContext;

0 commit comments

Comments
 (0)