/** * An extension over <code>System.getProperty</code> method * that additionally produces an int value. * Handles security restrictions, and returns <code>0</code> * if the access to the property is restricted. * @param property The system property name. * @return The value of the system property, * or the default value. */ public static int getInt(String property) { return getInt(property, 0); }
/** * An extension over <code>System.getProperty</code> method * that additionally produces an int value. * Handles security restrictions, and returns <code>0</code> * if the access to the property is restricted. * @param property The system property name. * @return The value of the system property, * or the default value. */ public static int getInt(String property) { return getInt(property, 0); }
/** * An extension over <code>System.getProperty</code> method * that additionally produces an int value. * Handles security restrictions, and returns <code>0</code> * if the access to the property is restricted. * @param property The system property name. * @return The value of the system property, * or the default value. */ public static int getInt(String property) { return getInt(property, 0); }
/** * An extension over <code>System.getProperty</code> method * that additionally produces an int value. * Handles security restrictions, and returns <code>0</code> * if the access to the property is restricted. * @param property The system property name. * @return The value of the system property, * or the default value. */ public static int getInt(String property) { return getInt(property, 0); }
private static int determineArchDataModel() { int dataModel = SafePropertyAccessor.getInt("sun.arch.data.model"); // default: 0 if (dataModel != 32 && dataModel != 64) { switch (CPU) { case I386: case POWERPC: case SPARC: dataModel = 32; break; case X86_64: case POWERPC64: case POWERPC64LE: case SPARCV9: case S390X: case AARCH64: dataModel = 64; break; default: dataModel = 0; } } return dataModel; }
private static int determineArchDataModel() { int dataModel = SafePropertyAccessor.getInt("sun.arch.data.model"); // default: 0 if (dataModel != 32 && dataModel != 64) { switch (CPU) { case I386: case POWERPC: case SPARC: dataModel = 32; break; case X86_64: case POWERPC64: case POWERPC64LE: case SPARCV9: case S390X: case AARCH64: dataModel = 64; break; default: dataModel = 0; } } return dataModel; }