github-advanced-security[bot] commented on code in PR #873:
URL:
https://github.com/apache/incubator-baremaps/pull/873#discussion_r1637896383
##########
baremaps-core/src/main/java/org/apache/baremaps/database/function/PutChangeImporter.java:
##########
@@ -57,54 +55,49 @@
/** {@inheritDoc} */
@Override
public void accept(Change change) {
- var nodes = change.getEntities().stream()
+ var nodes = change.entities().stream()
.filter(entity -> entity instanceof Node)
.map(entity -> (Node) entity)
.toList();
- var nodeIds = nodes.stream().map(Node::getId).toList();
- var ways = change.getEntities().stream()
+ var ways = change.entities().stream()
.filter(entity -> entity instanceof Way)
.map(entity -> (Way) entity)
.toList();
- var wayIds = ways.stream().map(Way::getId).toList();
- var relations = change.getEntities().stream()
+ var relations = change.entities().stream()
.filter(entity -> entity instanceof Relation)
.map(entity -> (Relation) entity)
.toList();
- var relationIds = relations.stream().map(Relation::getId).toList();
try {
- switch (change.getType()) {
+ switch (change.type()) {
Review Comment:
## Missing enum case in switch
Switch statement does not have a case for [MODIFY](1).
[Show more
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1463)
##########
baremaps-core/src/main/java/org/apache/baremaps/database/function/CopyChangeImporter.java:
##########
@@ -56,57 +54,49 @@
/** {@inheritDoc} */
@Override
public void accept(Change change) {
- var nodes = change.getEntities().stream()
+ var nodes = change.entities().stream()
.filter(entity -> entity instanceof Node)
.map(entity -> (Node) entity)
.toList();
- var nodeIds = nodes.stream().map(Node::getId).toList();
- var ways = change.getEntities().stream()
+ var ways = change.entities().stream()
.filter(entity -> entity instanceof Way)
.map(entity -> (Way) entity)
.toList();
- var wayIds = ways.stream().map(Way::getId).toList();
- var relations = change.getEntities().stream()
+ var relations = change.entities().stream()
.filter(entity -> entity instanceof Relation)
.map(entity -> (Relation) entity)
.toList();
- var relationIds = relations.stream().map(Relation::getId).toList();
try {
- switch (change.getType()) {
+ switch (change.type()) {
Review Comment:
## Missing enum case in switch
Switch statement does not have a case for [MODIFY](1).
[Show more
details](https://github.com/apache/incubator-baremaps/security/code-scanning/1462)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]