|
94 | 94 | import org.slf4j.Logger; |
95 | 95 | import org.slf4j.LoggerFactory; |
96 | 96 |
|
97 | | -import com.google.common.base.Joiner; |
98 | | - |
99 | 97 | /** |
100 | 98 | * The SPARQLProtocolSession provides low level HTTP methods for communication with SPARQL endpoints. All |
101 | 99 | * methods are compliant to the <a href="https://www.w3.org/TR/sparql11-protocol/">SPARQL 1.1 Protocol W3C |
@@ -151,11 +149,6 @@ public class SPARQLProtocolSession implements HttpClientDependent { |
151 | 149 |
|
152 | 150 | final Logger logger = LoggerFactory.getLogger(this.getClass()); |
153 | 151 |
|
154 | | - /** |
155 | | - * shared instance of a {@link Joiner} for creating a comma-separated string. |
156 | | - */ |
157 | | - private static final Joiner commaJoiner = Joiner.on(", "); |
158 | | - |
159 | 152 | /*-----------* |
160 | 153 | * Variables * |
161 | 154 | *-----------*/ |
@@ -828,7 +821,7 @@ private HttpResponse sendTupleQueryViaHttp(HttpUriRequest method, Set<QueryResul |
828 | 821 | } |
829 | 822 | } |
830 | 823 |
|
831 | | - method.addHeader(ACCEPT_PARAM_NAME, commaJoiner.join(acceptValues)); |
| 824 | + method.addHeader(ACCEPT_PARAM_NAME, String.join(", ", acceptValues)); |
832 | 825 |
|
833 | 826 | try { |
834 | 827 | return executeOK(method); |
@@ -966,7 +959,7 @@ private HttpResponse sendGraphQueryViaHttp(HttpUriRequest method, boolean requir |
966 | 959 | List<String> acceptParams = RDFFormat.getAcceptParams(rdfFormats, requireContext, |
967 | 960 | getPreferredRDFFormat()); |
968 | 961 |
|
969 | | - method.addHeader(ACCEPT_PARAM_NAME, commaJoiner.join(acceptParams)); |
| 962 | + method.addHeader(ACCEPT_PARAM_NAME, String.join(", ", acceptParams)); |
970 | 963 |
|
971 | 964 | try { |
972 | 965 | return executeOK(method); |
@@ -1047,7 +1040,7 @@ private HttpResponse sendBooleanQueryViaHttp(HttpUriRequest method, Set<QueryRes |
1047 | 1040 | } |
1048 | 1041 | } |
1049 | 1042 |
|
1050 | | - method.addHeader(ACCEPT_PARAM_NAME, commaJoiner.join(acceptValues)); |
| 1043 | + method.addHeader(ACCEPT_PARAM_NAME, String.join(", ", acceptValues)); |
1051 | 1044 |
|
1052 | 1045 | return executeOK(method); |
1053 | 1046 | } |
|
0 commit comments