1 /*
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
378 throw new UnsupportedClassVersionError(
379 "version numbers of class are not supported");
380 case JDWP.Error.ADD_METHOD_NOT_IMPLEMENTED:
381 throw new UnsupportedOperationException(
382 "add method not implemented");
383 case JDWP.Error.SCHEMA_CHANGE_NOT_IMPLEMENTED :
384 throw new UnsupportedOperationException(
385 "schema change not implemented");
386 case JDWP.Error.HIERARCHY_CHANGE_NOT_IMPLEMENTED:
387 throw new UnsupportedOperationException(
388 "hierarchy change not implemented");
389 case JDWP.Error.DELETE_METHOD_NOT_IMPLEMENTED :
390 throw new UnsupportedOperationException(
391 "delete method not implemented");
392 case JDWP.Error.CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED:
393 throw new UnsupportedOperationException(
394 "changes to class modifiers not implemented");
395 case JDWP.Error.METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED :
396 throw new UnsupportedOperationException(
397 "changes to method modifiers not implemented");
398 case JDWP.Error.NAMES_DONT_MATCH :
399 throw new NoClassDefFoundError(
400 "class names do not match");
401 default:
402 throw exc.toJDIException();
403 }
404 }
405
406 // Delete any record of the breakpoints
407 List<BreakpointRequest> toDelete = new ArrayList<>();
408 EventRequestManager erm = eventRequestManager();
409 it = erm.breakpointRequests().iterator();
410 while (it.hasNext()) {
411 BreakpointRequest req = (BreakpointRequest)it.next();
412 if (classToBytes.containsKey(req.location().declaringType())) {
413 toDelete.add(req);
414 }
415 }
416 erm.deleteEventRequests(toDelete);
417
|
1 /*
2 * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
378 throw new UnsupportedClassVersionError(
379 "version numbers of class are not supported");
380 case JDWP.Error.ADD_METHOD_NOT_IMPLEMENTED:
381 throw new UnsupportedOperationException(
382 "add method not implemented");
383 case JDWP.Error.SCHEMA_CHANGE_NOT_IMPLEMENTED :
384 throw new UnsupportedOperationException(
385 "schema change not implemented");
386 case JDWP.Error.HIERARCHY_CHANGE_NOT_IMPLEMENTED:
387 throw new UnsupportedOperationException(
388 "hierarchy change not implemented");
389 case JDWP.Error.DELETE_METHOD_NOT_IMPLEMENTED :
390 throw new UnsupportedOperationException(
391 "delete method not implemented");
392 case JDWP.Error.CLASS_MODIFIERS_CHANGE_NOT_IMPLEMENTED:
393 throw new UnsupportedOperationException(
394 "changes to class modifiers not implemented");
395 case JDWP.Error.METHOD_MODIFIERS_CHANGE_NOT_IMPLEMENTED :
396 throw new UnsupportedOperationException(
397 "changes to method modifiers not implemented");
398 case JDWP.Error.CLASS_ATTRIBUTE_CHANGE_NOT_IMPLEMENTED :
399 throw new UnsupportedOperationException(
400 "changes to class attribute not implemented");
401 case JDWP.Error.NAMES_DONT_MATCH :
402 throw new NoClassDefFoundError(
403 "class names do not match");
404 default:
405 throw exc.toJDIException();
406 }
407 }
408
409 // Delete any record of the breakpoints
410 List<BreakpointRequest> toDelete = new ArrayList<>();
411 EventRequestManager erm = eventRequestManager();
412 it = erm.breakpointRequests().iterator();
413 while (it.hasNext()) {
414 BreakpointRequest req = (BreakpointRequest)it.next();
415 if (classToBytes.containsKey(req.location().declaringType())) {
416 toDelete.add(req);
417 }
418 }
419 erm.deleteEventRequests(toDelete);
420
|