softwaremill / elasticmq

In-memory message queue with an Amazon SQS-compatible interface. Runs stand-alone or embedded.

Home Page:https://softwaremill.com/open-source/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

1.3.13 does not work with Java 8.

trackiss opened this issue · comments

After updating to version 1.3.13 with Java 8, I get the following exception:

java.lang.NoSuchMethodError: java.lang.String.isBlank()Z
	at org.elasticmq.NodeAddress.suffix(NodeAddress.scala:13)
	at org.elasticmq.NodeAddress.fullAddress(NodeAddress.scala:10)
	at org.elasticmq.rest.sqs.QueueURLModule.baseQueueURL(SQSRestServerBuilder.scala:441)
	at org.elasticmq.rest.sqs.QueueURLModule.baseQueueURL$(SQSRestServerBuilder.scala:424)
	at org.elasticmq.rest.sqs.TheSQSRestServerBuilder$$anon$1.baseQueueURL(SQSRestServerBuilder.scala:137)
	at org.elasticmq.rest.sqs.QueueURLModule.queueURL(SQSRestServerBuilder.scala:448)
	at org.elasticmq.rest.sqs.QueueURLModule.queueURL$(SQSRestServerBuilder.scala:447)
	at org.elasticmq.rest.sqs.TheSQSRestServerBuilder$$anon$1.queueURL(SQSRestServerBuilder.scala:137)
        # ...

This is probably a problem with the following changes That is, the java.lang.String#isBlank method only exists in Java 11 and later:

#755

def suffix = if (contextPath.isBlank) "" else "/" + contextPathStripped

It requires either changing the code to work with Java 8 (maybe it should also test Java 8 on CI) or explicitly dropping Java 8 support.