Skip to content

Commit aab960f

Browse files
committed
Modify InternalErrorCode
1 parent e34afb9 commit aab960f

4 files changed

Lines changed: 8 additions & 6 deletions

File tree

openmessaging-api/src/main/java/io/openmessaging/manager/ListNameSpaceResult.java renamed to openmessaging-api/src/main/java/io/openmessaging/manager/ListNamespaceResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* @version OMS 1.0.0
99
* @since OMS 1.0.0
1010
*/
11-
public interface ListNameSpaceResult {
11+
public interface ListNamespaceResult {
1212
/**
1313
* @return all namespaces.
1414
*/

openmessaging-api/src/main/java/io/openmessaging/manager/ResourceManager.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import io.openmessaging.MessagingAccessPoint;
2121
import io.openmessaging.common.Error;
2222
import io.openmessaging.common.Result;
23-
import java.util.List;
2423

2524
/**
2625
* The {@code ResourceManager} is to provide a unified interface of resource management, allowing developers to manage
@@ -61,7 +60,7 @@ public interface ResourceManager {
6160
*
6261
* @return the list of all namespaces.
6362
*/
64-
List<String> listNamespaces();
63+
ListNamespaceResult listNamespaces();
6564

6665
/**
6766
* Creates a {@code Queue} resource in the configured namespace with some preset attributes.

openmessaging-api/src/test/java/io/openmessaging/internal/InternalErrorCodeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424

2525
public class InternalErrorCodeTest {
2626
@Test
27-
public void generateInternalException() throws Exception {
27+
public void generateInternalException() {
2828
OMSRuntimeException runtimeException = InternalErrorCode.generateInternalException(InternalErrorCode.IMPL_VERSION_ILLEGAL, "1.1.0");
29-
assertThat(runtimeException.getErrorCode()).isEqualTo(InternalErrorCode.IMPL_VERSION_ILLEGAL.name());
29+
assertThat(runtimeException.getErrorCode()).isEqualTo(InternalErrorCode.IMPL_VERSION_ILLEGAL.errorCode);
3030
assertThat(runtimeException.getMessage()).contains(String.format("The implementation version [%s] is illegal.", "1.1.0"));
3131
}
3232

openmessaging-api/src/test/java/io/openmessaging/internal/MessagingAccessPointAdapterTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import io.openmessaging.consumer.Consumer;
2626
import io.openmessaging.manager.ResourceManager;
2727
import io.openmessaging.producer.Producer;
28+
import io.openmessaging.producer.TransactionStateCheckListener;
2829
import org.junit.Test;
2930

3031
import static org.assertj.core.api.Assertions.assertThat;
@@ -46,7 +47,9 @@ class TestVendor implements MessagingAccessPoint {
4647
public TestVendor(KeyValue keyValue) {
4748
}
4849

49-
50+
@Override public Producer createProducer(TransactionStateCheckListener transactionStateCheckListener) {
51+
return null;
52+
}
5053

5154
@Override
5255
public String version() {

0 commit comments

Comments
 (0)