diff --git a/.pubnub.yml b/.pubnub.yml new file mode 100644 index 000000000..e435637a1 --- /dev/null +++ b/.pubnub.yml @@ -0,0 +1,4 @@ +name: java +features: + publish: + - STORE-FLAG diff --git a/VERSION b/VERSION index 1454f6ed4..4d54daddb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.0.1 +4.0.2 diff --git a/build.gradle b/build.gradle index 3ba163b4b..b4c5cf295 100644 --- a/build.gradle +++ b/build.gradle @@ -9,7 +9,7 @@ plugins { id 'findbugs' } group = 'com.pubnub' -version = '4.0.1' +version = '4.0.2' description = """""" diff --git a/src/main/java/com/pubnub/api/PubNub.java b/src/main/java/com/pubnub/api/PubNub.java index 5ba130e55..60d1c5e4f 100644 --- a/src/main/java/com/pubnub/api/PubNub.java +++ b/src/main/java/com/pubnub/api/PubNub.java @@ -30,10 +30,7 @@ import lombok.Getter; import lombok.extern.slf4j.Slf4j; -import java.io.IOException; -import java.io.InputStream; import java.util.Date; -import java.util.Properties; @Getter @@ -49,18 +46,17 @@ public class PubNub { @Getter(AccessLevel.NONE) private PublishSequenceManager publishSequenceManager; - private String sdkVersion; private static final int TIMESTAMP_DIVIDER = 1000; private static final int MAX_SEQUENCE = 65535; + private static final String SDK_VERSION = "4.0.2"; + public PubNub(final PNConfiguration initialConfig) { this.configuration = initialConfig; this.subscriptionManager = new SubscriptionManager(this); this.basePathManager = new BasePathManager(initialConfig); this.publishSequenceManager = new PublishSequenceManager(MAX_SEQUENCE); - - sdkVersion = fetchSDKVersion(); } public String getBaseUrl() { @@ -232,7 +228,7 @@ public int getTimestamp() { * @return version of the SDK. */ public String getVersion() { - return sdkVersion; + return SDK_VERSION; } /** @@ -249,21 +245,4 @@ public final void reconnect() { subscriptionManager.reconnect(); } - /** - * fetch the SDK version from the resource files. - * - * @return Stringified representation of the SDK version. - */ - private String fetchSDKVersion() { - Properties prop = new Properties(); - InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream("version.properties"); - try { - prop.load(in); - } catch (IOException e) { - return "N/A"; - } - - return prop.getProperty("version"); - - } }