Xuanwo commented on code in PR #2276: URL: https://github.com/apache/incubator-opendal/pull/2276#discussion_r1200190653
########## bindings/java/Cargo.toml: ########## @@ -16,7 +16,7 @@ # under the License. [package] -name = "opendal-java" +name = "opendaljni" Review Comment: I prefer to maintain the name 'opendal-java' for the following reasons: - It helps users who are not familiar with the Java ecosystem to understand what this is. - It maintains consistency with the naming style used for other bindings. ########## core/src/types/error.rs: ########## @@ -251,7 +257,7 @@ impl std::error::Error for Error { impl Error { /// Create a new Error with error kind and message. - pub fn new(kind: ErrorKind, message: &str) -> Self { + pub fn new(kind: ErrorKind, message: impl ToString) -> Self { Review Comment: I prefer to keep `Error::new` unchanged. ########## bindings/java/Cargo.toml: ########## @@ -32,10 +32,13 @@ crate-type = ["cdylib"] doc = false [dependencies] -jni = "0.21.1" opendal.workspace = true +enum-iterator = { version = "1.4.1", optional = true } +jni = "0.21.1" once_cell = "1.17.1" -tokio = { version = "1", features = ["full"] } - +tokio = { version = "1.28.1", features = ["full"] } num_cpus = "1.15.0" + +[features] Review Comment: We don't need to add a new feature for tests, we can move this into `dev-dependencies` ########## core/src/types/error.rs: ########## @@ -106,6 +107,11 @@ impl ErrorKind { pub fn into_static(self) -> &'static str { self.into() } + + /// Convert self into ordinal number + pub fn into_ordinal(self) -> u8 { Review Comment: `ErrorKind` is not ordered and users should not depend on this. -- 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: commits-unsubscr...@opendal.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org