jtulach commented on code in PR #9789:
URL: https://github.com/apache/netbeans/pull/9789#discussion_r4515833195


##########
profiler/profiler.heapwalker/src/org/netbeans/modules/profiler/heapwalk/details/basic/StringDetailsProvider.java:
##########
@@ -101,4 +122,13 @@ private String getJDK9String(Heap heap, Instance instance, 
String field, byte co
         }
         return null;
     }
+    
+    private int hiLoShift(boolean hi, Heap heap) {
+        if (hiShift == -1) {
+            JavaClass utf16Class = 
heap.getJavaClassByName("java.lang.StringUTF16"); // NOI18N
+            hiShift = (Integer) 
utf16Class.getValueOfStaticField("HI_BYTE_SHIFT"); // NOI18N

Review Comment:
   - the test is added in c8885c560b60fc1a4d827e3753b38daa230545d0
   - together with a fix, but it is different ...
   - ... in my case there is no `java.lang.StringUTF16` class loaded in the 
debugee
   - hence I am detecting endianess of the system



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to