< prev index next >

src/share/classes/javax/management/remote/rmi/RMIConnector.java

Print this page
@  rev 11389 : 8147857: RMIConnector logs attribute names incorrectly
|  Summary: Swap args passed to Collectors.joining
|  Reviewed-by: andrew, dfuchs, jbachorik


2622      **/
2623     private static volatile WeakReference<Object> orb = null;
2624 
2625     // TRACES & DEBUG
2626     //---------------
2627     private static String objects(final Object[] objs) {
2628         if (objs == null)
2629             return "null";
2630         else
2631             return Arrays.asList(objs).toString();
2632     }
2633 
2634     private static String strings(final String[] strs) {
2635         return objects(strs);
2636     }
2637 
2638     static String getAttributesNames(AttributeList attributes) {
2639         return attributes != null ?
2640                 attributes.asList().stream()
2641                         .map(Attribute::getName)
2642                         .collect(Collectors.joining("[", ", ", "]"))
2643                 : "[]";
2644     }
2645 }


2622      **/
2623     private static volatile WeakReference<Object> orb = null;
2624 
2625     // TRACES & DEBUG
2626     //---------------
2627     private static String objects(final Object[] objs) {
2628         if (objs == null)
2629             return "null";
2630         else
2631             return Arrays.asList(objs).toString();
2632     }
2633 
2634     private static String strings(final String[] strs) {
2635         return objects(strs);
2636     }
2637 
2638     static String getAttributesNames(AttributeList attributes) {
2639         return attributes != null ?
2640                 attributes.asList().stream()
2641                         .map(Attribute::getName)
2642                         .collect(Collectors.joining(", ", "[", "]"))
2643                 : "[]";
2644     }
2645 }
< prev index next >