From f479cffc9f1619f7bab11dbbac4dec5ec3f9d238 Mon Sep 17 00:00:00 2001 From: AsamK Date: Sat, 2 Apr 2016 22:57:13 +0200 Subject: [PATCH] Set user-agent null if PROJECT_NAME is null the name is only set if the code is run from a jar file --- src/main/java/org/asamk/signal/Manager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/asamk/signal/Manager.java b/src/main/java/org/asamk/signal/Manager.java index a4a9c37a..113fb0cc 100644 --- a/src/main/java/org/asamk/signal/Manager.java +++ b/src/main/java/org/asamk/signal/Manager.java @@ -58,7 +58,7 @@ class Manager implements Signal { public final static String PROJECT_NAME = Manager.class.getPackage().getImplementationTitle(); public final static String PROJECT_VERSION = Manager.class.getPackage().getImplementationVersion(); - private final static String USER_AGENT = PROJECT_NAME + " " + PROJECT_VERSION; + private final static String USER_AGENT = PROJECT_NAME == null ? null : PROJECT_NAME + " " + PROJECT_VERSION; private final static int PREKEY_MINIMUM_COUNT = 20; private static final int PREKEY_BATCH_SIZE = 100;