Skip to content

Commit

Permalink
Move servlet adapters to an internal package to avoid duplicating cla…
Browse files Browse the repository at this point in the history
…sses when building OSGi bundles (#789)

* Move servlet adapters to an internal package to avoid duplicating classes when building OSGi bundles

Signed-off-by: Antoine DESSAIGNE <antoine.dessaigne@gmail.com>

* Fix typo in Adapter preventing it to work properly

Signed-off-by: Antoine DESSAIGNE <antoine.dessaigne@gmail.com>
  • Loading branch information
adessaigne committed Jun 14, 2022
1 parent e517786 commit 75baa06
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.prometheus.client.exporter;

import io.prometheus.client.Adapter;
import io.prometheus.client.internal.Adapter;
import io.prometheus.client.CollectorRegistry;
import io.prometheus.client.Predicate;
import io.prometheus.client.servlet.common.exporter.Exporter;
Expand All @@ -13,7 +13,7 @@
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

import static io.prometheus.client.Adapter.wrap;
import static io.prometheus.client.internal.Adapter.wrap;

/**
* The MetricsServlet class provides a simple way of exposing the metrics values.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.prometheus.client.filter;

import io.prometheus.client.Adapter;
import io.prometheus.client.internal.Adapter;
import io.prometheus.client.servlet.common.filter.Filter;
import io.prometheus.client.servlet.common.filter.FilterConfigurationException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.prometheus.client;
package io.prometheus.client.internal;

import io.prometheus.client.servlet.common.adapter.FilterConfigAdapter;
import io.prometheus.client.servlet.common.adapter.HttpServletRequestAdapter;
Expand Down Expand Up @@ -58,7 +58,7 @@ private static class HttpServletResponseAdapterImpl implements HttpServletRespon

@Override
public void setStatus(int httpStatusCode) {
delegate.setBufferSize(httpStatusCode);
delegate.setStatus(httpStatusCode);
}

@Override
Expand Down

0 comments on commit 75baa06

Please sign in to comment.