This is an automated email from the ASF dual-hosted git repository.

hepin pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-pekko-persistence-jdbc.git


The following commit(s) were added to refs/heads/main by this push:
     new a48ac56  Unwrap single string interpolation syntax
a48ac56 is described below

commit a48ac56bd5da81c39c12e6aeb67d5fa14f8f3593
Author: Matthew de Detrich <[email protected]>
AuthorDate: Sat May 27 13:24:59 2023 +0200

    Unwrap single string interpolation syntax
---
 .../org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala | 4 ++--
 .../persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala   | 2 +-
 .../scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala | 2 +-
 .../test/scala/org/apache/pekko/persistence/jdbc/state/Payloads.scala | 4 ++--
 project/CopyrightHeader.scala                                         | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git 
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
 
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
index c8128a9..fef5795 100644
--- 
a/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
+++ 
b/core/src/main/scala/org/apache/pekko/persistence/jdbc/state/DurableStateQueries.scala
@@ -71,7 +71,7 @@ import 
pekko.persistence.jdbc.config.DurableStateTableConfiguration
             VALUES
             (
               ${row.persistenceId},
-              #${seqNextValue},
+              #$seqNextValue,
               ${row.revision},
               ${row.statePayload},
               ${row.stateSerId},
@@ -84,7 +84,7 @@ import 
pekko.persistence.jdbc.config.DurableStateTableConfiguration
 
   private[jdbc] def updateDbWithDurableState(row: 
DurableStateTables.DurableStateRow, seqNextValue: String) = {
     sqlu"""UPDATE #${durableStateTableCfg.tableName}
-           SET #${durableStateTableCfg.columnNames.globalOffset} = 
#${seqNextValue},
+           SET #${durableStateTableCfg.columnNames.globalOffset} = 
#$seqNextValue,
                #${durableStateTableCfg.columnNames.revision} = ${row.revision},
                #${durableStateTableCfg.columnNames.statePayload} = 
${row.statePayload},
                #${durableStateTableCfg.columnNames.stateSerId} = 
${row.stateSerId},
diff --git 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
index 08f987d..8361a9f 100644
--- 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
+++ 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/JournalDaoStreamMessagesMemoryTest.scala
@@ -123,7 +123,7 @@ abstract class 
JournalDaoStreamMessagesMemoryTest(configFile: String)
             .map {
               case Success((repr, _)) =>
                 if (repr.sequenceNr % 100 == 0)
-                  log.info(s"fetched: ${repr.persistenceId} - 
${repr.sequenceNr}/${totalMessages}")
+                  log.info(s"fetched: ${repr.persistenceId} - 
${repr.sequenceNr}/$totalMessages")
               case Failure(exception) =>
                 log.error("Failure when reading messages.", exception)
             }
diff --git 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
index e738d07..c5845bd 100644
--- 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
+++ 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/query/QueryTestSpec.scala
@@ -409,7 +409,7 @@ trait SqlServerCleaner extends QueryTestSpec {
     }
     withStatement { stmt =>
       tables.foreach { name => stmt.executeUpdate(s"DELETE FROM $name") }
-      stmt.executeUpdate(s"DBCC CHECKIDENT('${journalTableName}', RESEED, 
$reset)")
+      stmt.executeUpdate(s"DBCC CHECKIDENT('$journalTableName', RESEED, 
$reset)")
     }
   }
 
diff --git 
a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/Payloads.scala 
b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/Payloads.scala
index 093d4c0..36f80fe 100644
--- a/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/Payloads.scala
+++ b/core/src/test/scala/org/apache/pekko/persistence/jdbc/state/Payloads.scala
@@ -25,13 +25,13 @@ class MyPayloadSerializer extends Serializer {
   def includeManifest: Boolean = true
 
   def toBinary(o: AnyRef): Array[Byte] = o match {
-    case MyPayload(data) => s"${data}".getBytes("UTF-8")
+    case MyPayload(data) => s"$data".getBytes("UTF-8")
     case _               => throw new Exception("Unknown object for 
serialization")
   }
 
   def fromBinary(bytes: Array[Byte], manifest: Option[Class[_]]): AnyRef = 
manifest match {
     case Some(MyPayloadClass) => MyPayload(s"${new String(bytes, "UTF-8")}")
-    case Some(c)              => throw new Exception(s"unexpected manifest 
${c}")
+    case Some(c)              => throw new Exception(s"unexpected manifest $c")
     case None                 => throw new Exception("no manifest")
   }
 }
diff --git a/project/CopyrightHeader.scala b/project/CopyrightHeader.scala
index 22310f4..da89819 100644
--- a/project/CopyrightHeader.scala
+++ b/project/CopyrightHeader.scala
@@ -69,7 +69,7 @@ trait CopyrightHeader extends AutoPlugin {
         case Some(currentText) if isLightbendCopyrighted(currentText) =>
           HeaderCommentStyle.cStyleBlockComment.commentCreator(text, 
existingText) + NewLine * 2 + currentText
         case Some(currentText) =>
-          throw new IllegalStateException(s"Unable to detect copyright for 
header:[${currentText}]")
+          throw new IllegalStateException(s"Unable to detect copyright for 
header:[$currentText]")
         case None =>
           HeaderCommentStyle.cStyleBlockComment.commentCreator(text, 
existingText)
       }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to