< prev index next >

make/jdk/src/classes/build/tools/classlist/HelloClasslist.java

Print this page
rev 54607 : 8222895: StackOverflowError in custom security manager that relies on ClassSpecializer
Reviewed-by: TBD


  55     private static final Logger LOGGER = Logger.getLogger("Hello");
  56 
  57     public static void main(String ... args) {
  58 
  59         List<String> strings = Arrays.asList("Hello", "World!", "From: ",
  60               InetAddress.getLoopbackAddress().toString());
  61 
  62         String helloWorld = strings.parallelStream()
  63               .map(s -> s.toLowerCase(Locale.ROOT))
  64               .collect(joining(","));
  65 
  66         Stream.of(helloWorld.split(","))
  67               .forEach(System.out::println);
  68 
  69         // Common concatenation patterns
  70         String SS     = String.valueOf(args.length) + String.valueOf(args.length);
  71         String CS     = "string" + String.valueOf(args.length);
  72         String SC     = String.valueOf(args.length) + "string";
  73         String SCS    = String.valueOf(args.length) + "string" + String.valueOf(args.length);
  74         String CSS    = "string" + String.valueOf(args.length) + String.valueOf(args.length);


  75         String CSCS   = "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length);
  76         String SCSC   = String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string";
  77         String CSCSC  = "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string";
  78         String SCSCS  = String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length);
  79         String CI     = "string" + args.length;
  80         String IC     = args.length + "string";
  81         String CIC    = "string" + args.length + "string";
  82         String CICI   = "string" + args.length + "string" + args.length;
  83         String CJ     = "string" + System.currentTimeMillis();
  84         String JC     = System.currentTimeMillis() + "string";
  85         String CJC    = "string" + System.currentTimeMillis() + "string";
  86         String CJCJ   = "string" + System.currentTimeMillis() + "string" + System.currentTimeMillis();
  87         String CJCJC  = "string" + System.currentTimeMillis() + "string" + System.currentTimeMillis() + "string";
  88 
  89         String newDate = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(
  90                 LocalDateTime.now(ZoneId.of("GMT")));
  91 
  92         String oldDate = String.format("%s%n",
  93                 DateFormat.getDateInstance(DateFormat.DEFAULT, Locale.ROOT)
  94                         .format(new Date()));


  55     private static final Logger LOGGER = Logger.getLogger("Hello");
  56 
  57     public static void main(String ... args) {
  58 
  59         List<String> strings = Arrays.asList("Hello", "World!", "From: ",
  60               InetAddress.getLoopbackAddress().toString());
  61 
  62         String helloWorld = strings.parallelStream()
  63               .map(s -> s.toLowerCase(Locale.ROOT))
  64               .collect(joining(","));
  65 
  66         Stream.of(helloWorld.split(","))
  67               .forEach(System.out::println);
  68 
  69         // Common concatenation patterns
  70         String SS     = String.valueOf(args.length) + String.valueOf(args.length);
  71         String CS     = "string" + String.valueOf(args.length);
  72         String SC     = String.valueOf(args.length) + "string";
  73         String SCS    = String.valueOf(args.length) + "string" + String.valueOf(args.length);
  74         String CSS    = "string" + String.valueOf(args.length) + String.valueOf(args.length);
  75         String CSC    = "string" + String.valueOf(args.length) + "string";
  76         String SSC    = String.valueOf(args.length) + String.valueOf(args.length) + "string";
  77         String CSCS   = "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length);
  78         String SCSC   = String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string";
  79         String CSCSC  = "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string";
  80         String SCSCS  = String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length);
  81         String CI     = "string" + args.length;
  82         String IC     = args.length + "string";
  83         String CIC    = "string" + args.length + "string";
  84         String CICI   = "string" + args.length + "string" + args.length;
  85         String CJ     = "string" + System.currentTimeMillis();
  86         String JC     = System.currentTimeMillis() + "string";
  87         String CJC    = "string" + System.currentTimeMillis() + "string";
  88         String CJCJ   = "string" + System.currentTimeMillis() + "string" + System.currentTimeMillis();
  89         String CJCJC  = "string" + System.currentTimeMillis() + "string" + System.currentTimeMillis() + "string";
  90 
  91         String newDate = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(
  92                 LocalDateTime.now(ZoneId.of("GMT")));
  93 
  94         String oldDate = String.format("%s%n",
  95                 DateFormat.getDateInstance(DateFormat.DEFAULT, Locale.ROOT)
  96                         .format(new Date()));
< prev index next >