Skip to content

Commit

Permalink
fix is_deleted bug
Browse files Browse the repository at this point in the history
  • Loading branch information
waderwu committed Dec 29, 2023
1 parent 20569f9 commit 734e1ce
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ From neo4j:5.12.0

LABEL maintainer="yxxx <yxwuman@gmail.com>"

COPY target/bytecodedl-pathfinder-1.0.0.jar /var/lib/neo4j/plugins
COPY target/bytecodedl-pathfinder-1.0.1.jar /var/lib/neo4j/plugins

ENV NEO4J_AUTH=neo4j/bytecodedl \
NEO4J_dbms_security_procedures_unrestricted=bytecodedl.*
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@
-[releases](https://github.com/BytecodeDL/bytecodedl-pathfinder-neo4j-procedure/releases/)下载最新的jar, 然后放到neo4j的`/var/lib/neo4j/plugins`目录
- 然后在`/var/lib/neo4j/conf/neo4j.conf`增加一行`dbms.security.procedures.unrestricted=bytecodedl.*`
- docker
- `docker pull wuxxxxx/neo4j-server:5.12.0-bytecodedl-pathfinder-1.0.0`
- `docker pull wuxxxxx/neo4j-server:5.12.0-bytecodedl-pathfinder-1.0.1`
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public List<Relationship> getFirstMultiDispatch(Path path, String callProperty){
}
Object property = relationship.getProperty(callProperty);
List<Relationship> relationships = startNode.getRelationships(relationship.getType()).stream().filter(
relation ->relation.hasProperty(callProperty) && relation.getProperty(callProperty).equals(property) && !Objects.equals(relation.getProperty("is_deleted", 0), 0)
relation ->relation.hasProperty(callProperty) && relation.getProperty(callProperty).equals(property) && Objects.equals(relation.getProperty("is_deleted", 0), 0)
).collect(Collectors.toList());

if (relationships.size() > 1){
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/call_graph.cypher
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CREATE (S1:Sink1 {method:'sink1'})
CREATE (A)-[:Call {insn:'insnAB'}]->(B),
(A)-[:Call {insn:'insnAC'}]->(C0),
(A)-[:Call {insn:'insnAC'}]->(C1),
(A)-[:Call {insn:'insnAC'}]->(C2),
(A)-[:Call {insn:'insnAC', is_deleted:1}]->(C2),
(C0)-[:Call {insn:'insnC0D'}]->(D),
(C1)-[:Call {insn:'insnC1S'}]->(S),
(C2)-[:Call {insn:'insnC2S'}]->(S),
Expand Down

0 comments on commit 734e1ce

Please sign in to comment.