File tree Expand file tree Collapse file tree 2 files changed +262
-2161
lines changed
java/net/datafaker/providers/base Expand file tree Collapse file tree 2 files changed +262
-2161
lines changed Original file line number Diff line number Diff line change 11package net .datafaker .providers .base ;
22
3- import java .nio .ByteBuffer ;
4- import java .nio .MappedByteBuffer ;
53import java .nio .charset .Charset ;
64import java .nio .charset .StandardCharsets ;
7- import java .util .List ;
85import java .util .Locale ;
96
107/**
@@ -31,16 +28,7 @@ public String capitalCity() {
3128 }
3229
3330 public String flag () {
34- @ SuppressWarnings ("unchecked" )
35- List <Integer > flagInts = (List <Integer >) faker .fakeValuesService ().fetch ("nation.flag" , faker .getContext ());
36-
37- ByteBuffer byteBuffer = MappedByteBuffer .allocate (flagInts .size ());
38-
39- for (Integer flagInt : flagInts ) {
40- byteBuffer .put (flagInt .byteValue ());
41- }
42-
43- return new String (byteBuffer .array (), UTF8_CHARSET );
31+ return resolve ("nation.flag" );
4432 }
4533
4634 public String isoLanguage () {
You can’t perform that action at this time.
0 commit comments