@@ -546,12 +546,12 @@ else if (resolved != null) {
546546 private List <TopicPartitionOffset > resolveTopicPartitionsList (TopicPartition topicPartition ) {
547547 Object topic = resolveExpression (topicPartition .topic ());
548548 Assert .state (topic instanceof String ,
549- "topic in @TopicPartition must resolve to a String, not " + topic .getClass ());
549+ () -> "topic in @TopicPartition must resolve to a String, not " + topic .getClass ());
550550 Assert .state (StringUtils .hasText ((String ) topic ), "topic in @TopicPartition must not be empty" );
551551 String [] partitions = topicPartition .partitions ();
552552 PartitionOffset [] partitionOffsets = topicPartition .partitionOffsets ();
553553 Assert .state (partitions .length > 0 || partitionOffsets .length > 0 ,
554- "At least one 'partition' or 'partitionOffset' required in @TopicPartition for topic '" + topic + "'" );
554+ () -> "At least one 'partition' or 'partitionOffset' required in @TopicPartition for topic '" + topic + "'" );
555555 List <TopicPartitionOffset > result = new ArrayList <>();
556556 for (String partition : partitions ) {
557557 resolvePartitionAsInteger ((String ) topic , resolveExpression (partition ), result );
@@ -580,7 +580,7 @@ private Integer resolvePartition(Object topic, PartitionOffset partitionOffset)
580580 Integer partition ;
581581 if (partitionValue instanceof String ) {
582582 Assert .state (StringUtils .hasText ((String ) partitionValue ),
583- "partition in @PartitionOffset for topic '" + topic + "' cannot be empty" );
583+ () -> "partition in @PartitionOffset for topic '" + topic + "' cannot be empty" );
584584 partition = Integer .valueOf ((String ) partitionValue );
585585 }
586586 else if (partitionValue instanceof Integer ) {
@@ -599,7 +599,7 @@ private Long resolveInitialOffset(Object topic, PartitionOffset partitionOffset)
599599 Long initialOffset ;
600600 if (initialOffsetValue instanceof String ) {
601601 Assert .state (StringUtils .hasText ((String ) initialOffsetValue ),
602- "'initialOffset' in @PartitionOffset for topic '" + topic + "' cannot be empty" );
602+ () -> "'initialOffset' in @PartitionOffset for topic '" + topic + "' cannot be empty" );
603603 initialOffset = Long .valueOf ((String ) initialOffsetValue );
604604 }
605605 else if (initialOffsetValue instanceof Long ) {
@@ -661,7 +661,7 @@ private void resolvePartitionAsInteger(String topic, Object resolvedValue,
661661 }
662662 else if (resolvedValue instanceof String ) {
663663 Assert .state (StringUtils .hasText ((String ) resolvedValue ),
664- "partition in @TopicPartition for topic '" + topic + "' cannot be empty" );
664+ () -> "partition in @TopicPartition for topic '" + topic + "' cannot be empty" );
665665 result .add (new TopicPartitionOffset (topic , Integer .valueOf ((String ) resolvedValue )));
666666 }
667667 else if (resolvedValue instanceof Integer []) {
0 commit comments