New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: use CSV parsing instead of string splitting for built-in file adapter #171
Conversation
I added the function of reading the CSV file in the constructor of fileaAdapter and processed it. |
src/main/java/org/casbin/jcasbin/persist/file_adapter/FileAdapter.java
Outdated
Show resolved
Hide resolved
@shy1st plz sign off: |
I have fixed it. |
Owing to the fact that I modified the loadPolicyLine function in the Helper.Maybe other projects need to be modified as well, such as jdbcAdapter.What do you think of this problem? @hsluoyz |
@shy1st I don't know why we are changing the interface. We will NOT change the the interface. Plz only modify the file adapter class code. If anything doesn't fit your need, just implement your own utility functions inside the class. |
eac327e
to
37ae1b0
Compare
@@ -14,6 +14,7 @@ | |||
|
|||
package org.casbin.jcasbin.main; | |||
|
|||
import org.apache.commons.csv.CSVFormat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
@@ -14,13 +14,14 @@ | |||
|
|||
package org.casbin.jcasbin.main; | |||
|
|||
import org.apache.commons.csv.CSVFormat; | |||
import org.apache.commons.csv.CSVParser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
src/test/java/org/casbin/jcasbin/main/SyncedEnforcerUnitTest.java
Outdated
Show resolved
Hide resolved
dbd35d3
to
2dc18bd
Compare
🎉 This PR is included in version 1.8.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Fix: #158