< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/share/jdi/HeapwalkingDebuggee.java

Print this page




 180                 return true;
 181             }
 182         } catch (IOException e) {
 183             throw new TestBug("Invalid command format: " + command);
 184         }
 185 
 186         return false;
 187     }
 188 
 189     // instances of some classes couldn't be strictly controlled during test execution, use non-strict checks for this classes
 190     public static boolean useStrictCheck(String className, boolean otherThreadPresent) {
 191         if (className.equals("java.lang.String"))
 192             return false;
 193 
 194         if (className.equals("char[]"))
 195             return false;
 196 
 197         if (className.equals("byte[]"))
 198             return false;
 199 















 200         if (className.equals("java.lang.Thread")) {
 201             if (otherThreadPresent)
 202                 return false;
 203         }
 204 
 205         return true;
 206     }
 207 
 208     // is reference with given type should be included in ObjectReference.referringObjects
 209     static public boolean isIncludedIntoReferrersCount(String referenceType) {
 210         if (!ObjectInstancesManager.allReferenceTypes.contains(referenceType)) {
 211             throw new TestBug("Invalid reference type: " + referenceType);
 212         }
 213 
 214         return includedIntoReferrersCountTypes.contains(referenceType);
 215     }
 216 
 217     // is reference with given type should be included in ReferenceType.instances
 218     static public boolean isIncludedIntoInstancesCount(String referenceType) {
 219         if (!ObjectInstancesManager.allReferenceTypes.contains(referenceType)) {


 180                 return true;
 181             }
 182         } catch (IOException e) {
 183             throw new TestBug("Invalid command format: " + command);
 184         }
 185 
 186         return false;
 187     }
 188 
 189     // instances of some classes couldn't be strictly controlled during test execution, use non-strict checks for this classes
 190     public static boolean useStrictCheck(String className, boolean otherThreadPresent) {
 191         if (className.equals("java.lang.String"))
 192             return false;
 193 
 194         if (className.equals("char[]"))
 195             return false;
 196 
 197         if (className.equals("byte[]"))
 198             return false;
 199 
 200         if (className.equals("boolean[]"))
 201             return false;
 202 
 203         if (className.equals("float[]"))
 204             return false;
 205 
 206         if (className.equals("long[]"))
 207             return false;
 208 
 209         if (className.equals("int[]"))
 210             return false;
 211 
 212         if (className.equals("double[]"))
 213             return false;
 214 
 215         if (className.equals("java.lang.Thread")) {
 216             if (otherThreadPresent)
 217                 return false;
 218         }
 219 
 220         return true;
 221     }
 222 
 223     // is reference with given type should be included in ObjectReference.referringObjects
 224     static public boolean isIncludedIntoReferrersCount(String referenceType) {
 225         if (!ObjectInstancesManager.allReferenceTypes.contains(referenceType)) {
 226             throw new TestBug("Invalid reference type: " + referenceType);
 227         }
 228 
 229         return includedIntoReferrersCountTypes.contains(referenceType);
 230     }
 231 
 232     // is reference with given type should be included in ReferenceType.instances
 233     static public boolean isIncludedIntoInstancesCount(String referenceType) {
 234         if (!ObjectInstancesManager.allReferenceTypes.contains(referenceType)) {
< prev index next >