Change get_S_IAMB method to static initializaer block so that does not clash with accessor generated by translator
@@ -57,7 +57,7 @@ class UnixConstants {
static final int O_NOFOLLOW = OsConstants.O_NOFOLLOW;
- static final int S_IAMB = get_S_IAMB_helper();
+ static final int S_IAMB;
static final int S_IRUSR = OsConstants.S_IRUSR;
@@ -133,9 +133,10 @@ class UnixConstants {
// S_IAMB are access mode bits, therefore, calculated by taking OR of all the read, write and
// execute permissions bits for owner, group and other.
- // J2ObjC changed: renamed so can be properly translated
- private static int get_S_IAMB_helper() {
- return (OsConstants.S_IRUSR | OsConstants.S_IWUSR | OsConstants.S_IXUSR |
+ // J2ObjC changed: converted method to static initializer block so does not clash with
+ // accessor generated by trnaslator
+ static {
+ S_IAMB = (OsConstants.S_IRUSR | OsConstants.S_IWUSR | OsConstants.S_IXUSR |
OsConstants.S_IRGRP | OsConstants.S_IWGRP | OsConstants.S_IXGRP |
OsConstants.S_IROTH | OsConstants.S_IWOTH | OsConstants.S_IXOTH);
}
