File tree 1 file changed +17
-2
lines changed
closed/test/jtreg-ext/requires
1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change 30
30
import java .util .concurrent .Callable ;
31
31
32
32
public class OpenJ9PropsExt implements Callable <Map <String , String >> {
33
-
33
+ private static final String ERROR_STATE = "__ERROR__" ;
34
34
@ Override
35
35
public Map <String , String > call () {
36
36
37
37
Map <String , String > map = new HashMap <>();
38
38
map .put ("vm.graal.enabled" , "false" );
39
+ map .put ("vm.bits" , vmBits ());
39
40
40
41
return map ;
41
42
}
42
-
43
+ private String errorWithMessage (String message ) {
44
+ new Exception (message ).printStackTrace ();
45
+ return ERROR_STATE + message ;
46
+ }
47
+ /**
48
+ * @return VM bitness, the value of the "sun.arch.data.model" property.
49
+ */
50
+ protected String vmBits () {
51
+ String dataModel = System .getProperty ("sun.arch.data.model" );
52
+ if (dataModel != null ) {
53
+ return dataModel ;
54
+ } else {
55
+ return errorWithMessage ("Can't get 'sun.arch.data.model' property" );
56
+ }
57
+ }
43
58
}
44
59
You can’t perform that action at this time.
0 commit comments