Destination: Extract repeated string to a constant

Change-Id: Ic12619b066c9b3013c65f42879d08b97055bc0d3
Signed-off-by: David Pursehouse <dpursehouse@digital.ai>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
index 2c6bc5e..746d2ca 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java
@@ -86,6 +86,8 @@
 public class Destination {
   private static final NamedFluentLogger repLog = ReplicationQueue.repLog;
 
+  private static final String PROJECT_NOT_AVAILABLE = "source project %s not available";
+
   public interface Factory {
     Destination create(DestinationConfiguration config);
   }
@@ -318,7 +320,7 @@
               })
           .call();
     } catch (NoSuchProjectException err) {
-      stateLog.error(String.format("source project %s not available", project), err, states);
+      stateLog.error(String.format(PROJECT_NOT_AVAILABLE, project), err, states);
     } catch (Exception e) {
       Throwables.throwIfUnchecked(e);
       throw new RuntimeException(e);
@@ -347,7 +349,7 @@
               })
           .call();
     } catch (NoSuchProjectException err) {
-      stateLog.error(String.format("source project %s not available", project), err, states);
+      stateLog.error(String.format(PROJECT_NOT_AVAILABLE, project), err, states);
     } catch (Exception e) {
       Throwables.throwIfUnchecked(e);
       throw new RuntimeException(e);
@@ -385,7 +387,7 @@
             return;
           }
         } catch (IOException err) {
-          stateLog.error(String.format("source project %s not available", project), err, state);
+          stateLog.error(String.format(PROJECT_NOT_AVAILABLE, project), err, state);
           return;
         }
       }