Skip to content

Commit ec65543

Browse files
committed
Do not use a reserved word as a package name.
In Window 'aux' is a reserved word. Rename the package to 'auxiliary' Fixes btraceio#478
1 parent 215e162 commit ec65543

6 files changed

Lines changed: 13 additions & 13 deletions

File tree

btrace-instr/src/test/java/org/openjdk/btrace/instr/InstrumentorTestBase.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
import org.openjdk.btrace.core.MethodID;
5656
import org.openjdk.btrace.core.SharedSettings;
5757
import org.openjdk.btrace.runtime.BTraceRuntimeAccess;
58-
import org.openjdk.btrace.runtime.aux.Auxilliary;
58+
import org.openjdk.btrace.runtime.auxiliary.Auxiliary;
5959
import sun.misc.Unsafe;
6060

6161
/** @author Jaroslav Bachorik */
@@ -193,7 +193,7 @@ public void visit(
193193
String[] interfaces) {
194194
int idx = name.lastIndexOf('/');
195195
name =
196-
Auxilliary.class.getPackage().getName().replace('.', '/')
196+
Auxiliary.class.getPackage().getName().replace('.', '/')
197197
+ '/'
198198
+ name.substring(idx + 1);
199199
super.visit(version, access, name, signature, superName, interfaces);

btrace-runtime/src/main/java/org/openjdk/btrace/runtime/BTraceRuntimeAccess.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import org.openjdk.btrace.core.handlers.ExitHandler;
4242
import org.openjdk.btrace.core.handlers.LowMemoryHandler;
4343
import org.openjdk.btrace.core.handlers.TimerHandler;
44-
import org.openjdk.btrace.runtime.aux.Auxilliary;
44+
import org.openjdk.btrace.runtime.auxiliary.Auxiliary;
4545
import org.openjdk.btrace.services.api.RuntimeContext;
4646

4747
/**
@@ -138,11 +138,11 @@ public static String getClientName(String forClassName) {
138138
int idx = forClassName.lastIndexOf('/');
139139
if (idx > -1) {
140140
forClassName =
141-
Auxilliary.class.getPackage().getName().replace('.', '/')
141+
Auxiliary.class.getPackage().getName().replace('.', '/')
142142
+ "/"
143143
+ forClassName.substring(idx + 1);
144144
} else {
145-
forClassName = Auxilliary.class.getPackage().getName().replace('.', '/') + "/" + forClassName;
145+
forClassName = Auxiliary.class.getPackage().getName().replace('.', '/') + "/" + forClassName;
146146
}
147147

148148
if (!uniqueClientClassNames) {

btrace-runtime/src/main/java/org/openjdk/btrace/runtime/aux/Auxilliary.java

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package org.openjdk.btrace.runtime.auxiliary;
2+
3+
public final class Auxiliary {}

btrace-runtime/src/main/java11/org/openjdk/btrace/runtime/BTraceRuntimeImpl_11.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import org.openjdk.btrace.core.DebugSupport;
4545
import org.openjdk.btrace.core.comm.CommandListener;
4646
import org.openjdk.btrace.core.jfr.JfrEvent;
47-
import org.openjdk.btrace.runtime.aux.Auxilliary;
47+
import org.openjdk.btrace.runtime.auxiliary.Auxiliary;
4848

4949
/**
5050
* Helper class used by BTrace built-in functions and also acts runtime "manager" for a specific
@@ -134,7 +134,7 @@ public Class<?> defineClass(byte[] code, boolean mustBeBootstrap) {
134134
}
135135

136136
Class<?> clz =
137-
MethodHandles.privateLookupIn(Auxilliary.class, MethodHandles.lookup()).defineClass(code);
137+
MethodHandles.privateLookupIn(Auxiliary.class, MethodHandles.lookup()).defineClass(code);
138138
// initialize the class by creating a dummy instance
139139
clz.getConstructor().newInstance();
140140
return clz;

btrace-runtime/src/main/java9/org/openjdk/btrace/runtime/BTraceRuntimeImpl_9.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
import org.openjdk.btrace.core.DebugSupport;
4444
import org.openjdk.btrace.core.comm.CommandListener;
4545
import org.openjdk.btrace.core.jfr.JfrEvent;
46-
import org.openjdk.btrace.runtime.aux.Auxilliary;
46+
import org.openjdk.btrace.runtime.auxiliary.Auxiliary;
4747

4848
/**
4949
* Helper class used by BTrace built-in functions and also acts runtime "manager" for a specific
@@ -123,7 +123,7 @@ public Class<?> defineClass(byte[] code, boolean mustBeBootstrap) {
123123
}
124124

125125
Class<?> clz =
126-
MethodHandles.privateLookupIn(Auxilliary.class, MethodHandles.lookup()).defineClass(code);
126+
MethodHandles.privateLookupIn(Auxiliary.class, MethodHandles.lookup()).defineClass(code);
127127
// initialize the class by creating a dummy instance
128128
clz.getConstructor().newInstance();
129129
return clz;
@@ -146,7 +146,7 @@ public Class<?> defineClass(byte[] code, boolean mustBeBootstrap) {
146146
public static Class<?> defineClass(byte[] code) {
147147
try {
148148
Class<?> clz =
149-
MethodHandles.privateLookupIn(Auxilliary.class, MethodHandles.lookup()).defineClass(code);
149+
MethodHandles.privateLookupIn(Auxiliary.class, MethodHandles.lookup()).defineClass(code);
150150
// initialize the class by creating a dummy instance
151151
clz.getConstructor().newInstance();
152152
return clz;

0 commit comments

Comments
 (0)