Skip to content

Commit 2dab590

Browse files
author
Valentin BAIZEAU
committed
Removed version constant to avoid duplicated information
1 parent 346cde4 commit 2dab590

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

remotesync-api/src/main/java/org/piwigo/remotesync/api/Constants.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ public boolean accept(File file) {
4141
}
4242

4343
}
44-
45-
/**
46-
* Added some constant to define the current version
47-
* Used to build the matching user-agent
48-
* @since v.0.0.14
49-
*/
50-
public static final String CLIENT_VERSION = "0.0.14";
5144

5245
public static final String DIRECTORY_DEFAULT = ConfigurationUtil.INSTANCE.getUserCurrentDirectory().getAbsolutePath();
5346

remotesync-api/src/main/java/org/piwigo/remotesync/api/client/WSClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ protected CloseableHttpClient getHttpClient() throws Exception {
218218
httpClientBuilder.setSSLSocketFactory(new SSLConnectionSocketFactory(sslContextBuilder.build()));
219219
}
220220

221-
httpClientBuilder.setUserAgent("PiwigoRemoteSync " + Constants.CLIENT_VERSION);
221+
httpClientBuilder.setUserAgent("PiwigoRemoteSync " + getClass().getPackage().getImplementationVersion());
222222
httpClient = httpClientBuilder.build();
223223
}
224224

0 commit comments

Comments
 (0)