< prev index next >

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

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -57,36 +57,28 @@
     public static void main(String ... args) {
 
         List<String> strings = Arrays.asList("Hello", "World!", "From: ",
               InetAddress.getLoopbackAddress().toString());
 
-        String helloWorld = strings.parallelStream()
+        String helloWorld = "";
+        /*
+        strings.parallelStream()
               .map(s -> s.toLowerCase(Locale.ROOT))
               .collect(joining(","));
+        */
 
         Stream.of(helloWorld.split(","))
               .forEach(System.out::println);
 
         // Common concatenation patterns
-        String SS     = String.valueOf(args.length) + String.valueOf(args.length);
-        String CS     = "string" + String.valueOf(args.length);
-        String SC     = String.valueOf(args.length) + "string";
-        String SCS    = String.valueOf(args.length) + "string" + String.valueOf(args.length);
-        String CSS    = "string" + String.valueOf(args.length) + String.valueOf(args.length);
-        String CSCS   = "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length);
-        String SCSC   = String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string";
-        String CSCSC  = "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string";
-        String SCSCS  = String.valueOf(args.length) + "string" + String.valueOf(args.length) + "string" + String.valueOf(args.length);
-        String CI     = "string" + args.length;
-        String IC     = args.length + "string";
-        String CIC    = "string" + args.length + "string";
-        String CICI   = "string" + args.length + "string" + args.length;
-        String CJ     = "string" + System.currentTimeMillis();
-        String JC     = System.currentTimeMillis() + "string";
-        String CJC    = "string" + System.currentTimeMillis() + "string";
-        String CJCJ   = "string" + System.currentTimeMillis() + "string" + System.currentTimeMillis();
-        String CJCJC  = "string" + System.currentTimeMillis() + "string" + System.currentTimeMillis() + "string";
+        String const_I = "string" + args.length;
+        String const_S = "string" + String.valueOf(args.length);
+        String S_const = String.valueOf(args.length) + "string";
+        String S_S     = String.valueOf(args.length) + String.valueOf(args.length);
+        String const_J = "string" + System.currentTimeMillis();
+        String I_const = args.length + "string";
+        String J_const = System.currentTimeMillis() + "string";
 
         String newDate = DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(
                 LocalDateTime.now(ZoneId.of("GMT")));
 
         String oldDate = String.format("%s%n",
< prev index next >