1 #!/bin/sh |
1 #!/bin/sh |
2 |
2 |
3 # |
3 # |
4 # Copyright (c) 2002, 2014 Oracle and/or its affiliates. All rights reserved. |
4 # Copyright (c) 2002, 2014, Oracle and/or its affiliates. All rights reserved. |
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
6 # |
6 # |
7 # This code is free software; you can redistribute it and/or modify it |
7 # This code is free software; you can redistribute it and/or modify it |
8 # under the terms of the GNU General Public License version 2 only, as |
8 # under the terms of the GNU General Public License version 2 only, as |
9 # published by the Free Software Foundation. |
9 # published by the Free Software Foundation. |
51 cat <<EOF > $classname.java.1 |
51 cat <<EOF > $classname.java.1 |
52 public class $classname { |
52 public class $classname { |
53 static class jj1 implements Runnable { |
53 static class jj1 implements Runnable { |
54 public void run() { |
54 public void run() { |
55 int count = 0; |
55 int count = 0; |
56 |
56 |
57 for ( int ii = 0; ii < 10; ii++) { // line 6 |
57 for ( int ii = 0; ii < 10; ii++) { // line 6 |
58 int intInPotato04 = 666; // line 7 |
58 int intInPotato04 = 666; // line 7 |
59 ++count; // line 8; @1 breakpoint |
59 ++count; // line 8; @1 breakpoint |
60 System.out.println("Thread: " + Thread.currentThread().getName()); // line 9 |
60 System.out.println("Thread: " + Thread.currentThread().getName()); // line 9 |
61 } |
61 } |
63 } |
63 } |
64 |
64 |
65 static class jj2 implements Runnable { |
65 static class jj2 implements Runnable { |
66 public void run() { |
66 public void run() { |
67 int count2 = 0; |
67 int count2 = 0; |
68 |
68 |
69 for (int ii = 0; ii < 10; ii++) { // line 18 |
69 for (int ii = 0; ii < 10; ii++) { // line 18 |
70 String StringInPotato05 = "I am"; // line 19 |
70 String StringInPotato05 = "I am"; // line 19 |
71 ++count2; // line 20; @1 breakpoint |
71 ++count2; // line 20; @1 breakpoint |
72 System.out.println("Thread: " + Thread.currentThread().getName()); // line 21 |
72 System.out.println("Thread: " + Thread.currentThread().getName()); // line 21 |
73 } |
73 } |
155 This test should be run and checked manually. |
155 This test should be run and checked manually. |
156 |
156 |
157 If this works right, you should see StepEvents/Breakpoint events for lines |
157 If this works right, you should see StepEvents/Breakpoint events for lines |
158 8, 9, 6, 7, 8, 9, 6, .... for thread jj11 |
158 8, 9, 6, 7, 8, 9, 6, .... for thread jj11 |
159 and |
159 and |
160 20, 21, 18, 19, 20, 21, 18, ... for thread jj2 |
160 20, 21, 18, 19, 20, 21, 18, ... for thread jj2 |
161 |
161 |
162 Since both threads are running at the same time, these |
162 Since both threads are running at the same time, these |
163 events can be intermixed. |
163 events can be intermixed. |
164 |
164 |
165 The bug is that you will frequently see step events missing. |
165 The bug is that you will frequently see step events missing. |