Code Review
/
nonrtric.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add docker build to mediator pom
[nonrtric.git]
/
dmaap-adaptor-java
/
src
/
main
/
java
/
org
/
oran
/
dmaapadapter
/
repository
/
InfoTypes.java
diff --git
a/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
b/dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
index
b8677a3
..
baa998b
100644
(file)
--- a/
dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
+++ b/
dmaap-adaptor-java/src/main/java/org/oran/dmaapadapter/repository/InfoTypes.java
@@
-28,6
+28,7
@@
import java.util.Vector;
import org.oran.dmaapadapter.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.oran.dmaapadapter.exceptions.ServiceException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.springframework.http.HttpStatus;
public class InfoTypes {
private static final Logger logger = LoggerFactory.getLogger(InfoTypes.class);
public class InfoTypes {
private static final Logger logger = LoggerFactory.getLogger(InfoTypes.class);
@@
-35,7
+36,6
@@
public class InfoTypes {
private Map<String, InfoType> allTypes = new HashMap<>();
public InfoTypes(Collection<InfoType> types) {
private Map<String, InfoType> allTypes = new HashMap<>();
public InfoTypes(Collection<InfoType> types) {
-
for (InfoType type : types) {
put(type);
}
for (InfoType type : types) {
put(type);
}
@@
-48,7
+48,7
@@
public class InfoTypes {
public synchronized InfoType getType(String id) throws ServiceException {
InfoType type = allTypes.get(id);
if (type == null) {
public synchronized InfoType getType(String id) throws ServiceException {
InfoType type = allTypes.get(id);
if (type == null) {
- throw new ServiceException("Could not find type: " + id);
+ throw new ServiceException("Could not find type: " + id
, HttpStatus.NOT_FOUND
);
}
return type;
}
}
return type;
}