From 085627e23a7095f8a4f795689a5aaecdbd3f0f50 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 25 Sep 2019 23:45:29 +0200 Subject: [PATCH 1/2] Remove deprecated "PacketReplyTimeout" methods in SmackConfiguration --- .../smack/SmackConfiguration.java | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java index 295ba203c7..cd49af68ee 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackConfiguration.java @@ -108,30 +108,6 @@ public static String getVersion() { return SmackInitialization.SMACK_VERSION; } - /** - * Returns the number of milliseconds to wait for a response from - * the server. The default value is 5000 ms. - * - * @return the milliseconds to wait for a response from the server - * @deprecated use {@link #getDefaultReplyTimeout()} instead. - */ - @Deprecated - public static int getDefaultPacketReplyTimeout() { - return getDefaultReplyTimeout(); - } - - /** - * Sets the number of milliseconds to wait for a response from - * the server. - * - * @param timeout the milliseconds to wait for a response from the server - * @deprecated use {@link #setDefaultReplyTimeout(int)} instead. - */ - @Deprecated - public static void setDefaultPacketReplyTimeout(int timeout) { - setDefaultReplyTimeout(timeout); - } - /** * Returns the number of milliseconds to wait for a response from * the server. The default value is 5000 ms. From 685265ff482ff003f07bd67323150679c4131493 Mon Sep 17 00:00:00 2001 From: John Haubrich Date: Thu, 10 Oct 2019 08:46:47 -0400 Subject: [PATCH 2/2] Set cmd.execute and srCmd.execute to run in projectDir rather than CWD. Add waitFor on git describe command --- build.gradle | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index d705a0cd22..0ae894a8c1 100644 --- a/build.gradle +++ b/build.gradle @@ -650,13 +650,16 @@ def getGitCommit() { def dotGit = new File("$projectDir/.git") if (!dotGit.isDirectory()) return 'non-git build' + def projectDir = dotGit.getParentFile() def cmd = 'git describe --always --tags --dirty=+' - def proc = cmd.execute() + def proc = cmd.execute(null, projectDir) + proc.waitForOrKill(10 * 1000) + def gitCommit = proc.text.trim() assert !gitCommit.isEmpty() def srCmd = 'git symbolic-ref --short HEAD' - def srProc = srCmd.execute() + def srProc = srCmd.execute(null, projectDir) srProc.waitForOrKill(10 * 1000) if (srProc.exitValue() == 0) { // Only add the information if the git command was