Skip to content

Commit f1e34e1

Browse files
author
Vladimir Kotal
committed
rename getHeaders()
1 parent 8d34347 commit f1e34e1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/RuntimeEnvironment.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
package org.opengrok.indexer.configuration;
2525

2626
import static org.opengrok.indexer.configuration.Configuration.makeXMLStringAsConfiguration;
27-
import static org.opengrok.indexer.index.IndexerUtil.getHeaders;
27+
import static org.opengrok.indexer.index.IndexerUtil.getWebAppHeaders;
2828

2929
import java.io.File;
3030
import java.io.FileNotFoundException;
@@ -1419,7 +1419,7 @@ public void writeConfiguration(String host) throws IOException {
14191419
.path("configuration")
14201420
.queryParam("reindex", true)
14211421
.request()
1422-
.headers(getHeaders())
1422+
.headers(getWebAppHeaders())
14231423
.put(Entity.xml(configXML));
14241424

14251425
if (r.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {
@@ -1446,7 +1446,7 @@ public void signalTorefreshSearcherManagers(List<String> subFiles, String host)
14461446
.path("system")
14471447
.path("refresh")
14481448
.request()
1449-
.headers(getHeaders())
1449+
.headers(getWebAppHeaders())
14501450
.put(Entity.text(project));
14511451

14521452
if (r.getStatusInfo().getFamily() != Response.Status.Family.SUCCESSFUL) {

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexDatabase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
import org.opengrok.indexer.util.TandemPath;
105105
import org.opengrok.indexer.web.Util;
106106

107-
import static org.opengrok.indexer.index.IndexerUtil.getHeaders;
107+
import static org.opengrok.indexer.index.IndexerUtil.getWebAppHeaders;
108108

109109
/**
110110
* This class is used to create / update the index databases. Currently we use
@@ -378,7 +378,7 @@ private void markProjectIndexed(Project project) {
378378
.path(Util.URIEncode(project.getName()))
379379
.path("indexed")
380380
.request()
381-
.headers(getHeaders())
381+
.headers(getWebAppHeaders())
382382
.put(Entity.text(""));
383383
} catch (RuntimeException e) {
384384
LOGGER.log(Level.WARNING, String.format("Couldn''t notify the webapp that project %s was indexed",

opengrok-indexer/src/main/java/org/opengrok/indexer/index/IndexerUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private IndexerUtil() {
4343
/**
4444
* @return map of HTTP headers to use when making API requests to the web application
4545
*/
46-
public static MultivaluedMap<String, Object> getHeaders() {
46+
public static MultivaluedMap<String, Object> getWebAppHeaders() {
4747
MultivaluedMap<String, Object> headers = new MultivaluedHashMap<>();
4848
String token = null;
4949
if ((token = RuntimeEnvironment.getInstance().getIndexerAuthenticationToken()) != null) {
@@ -75,7 +75,7 @@ public static void enableProjects(final String host) throws
7575
.path("configuration")
7676
.path("projectsEnabled")
7777
.request()
78-
.headers(getHeaders());
78+
.headers(getWebAppHeaders());
7979
final String enabled = request.get(String.class);
8080
if (enabled == null || !Boolean.valueOf(enabled)) {
8181
final Response r = request.put(Entity.text(Boolean.TRUE.toString()));

0 commit comments

Comments
 (0)