Skip to content

Commit 40defea

Browse files
committed
Check if null
1 parent 9cfdeb6 commit 40defea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/com/apiflows/parser/source/OperationBinder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ Operation findOperationByRef(String operationRef, List<Operation> operations) {
116116
// }
117117

118118
String getRootFolder(String location) {
119-
if(isUrl(location)) {
119+
if(location == null) {
120+
return ".";
121+
} else if(isUrl(location)) {
120122
return location.substring(0, location.lastIndexOf("/") + 1);
121123
} else {
122124
Path filePath = Paths.get(location);

0 commit comments

Comments
 (0)