Skip to content

Commit b20bc03

Browse files
committed
Allow MixinServiceAbstract#getSideName to be overridden
- Also cache when side cannot be found
1 parent 185271c commit b20bc03

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/main/java/org/spongepowered/asm/service/MixinServiceAbstract.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,12 @@ protected final void getContainersFromAgents(Builder<IContainerHandle> list) {
198198
}
199199
}
200200

201-
/* (non-Javadoc)
201+
/**
202202
* @see org.spongepowered.asm.service.IMixinService#getSideName()
203+
* CHANGED BY CLEANROOM: stripped final away, allowing overriding
203204
*/
204205
@Override
205-
public final String getSideName() {
206+
public String getSideName() {
206207
if (this.sideName != null) {
207208
return this.sideName;
208209
}
@@ -217,8 +218,9 @@ public final String getSideName() {
217218
this.getLogger("mixin").catching(ex);
218219
}
219220
}
220-
221-
return Constants.SIDE_UNKNOWN;
221+
222+
this.sideName = Constants.SIDE_UNKNOWN;
223+
return this.sideName;
222224
}
223225

224226
private List<IMixinPlatformServiceAgent> getServiceAgents() {

0 commit comments

Comments
 (0)