diff --git a/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java b/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java index 444f2c5f6b..549ad981ec 100644 --- a/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java +++ b/org.eclipse.equinox.weaving.aspectj/src/org/eclipse/equinox/weaving/aspectj/loadtime/OSGiWeavingAdaptor.java @@ -270,7 +270,11 @@ public byte[] weaveClass(final String name, byte[] bytes, } synchronized (this) { - bytes = super.weaveClass(name, bytes, mustWeave); + byte[] wovenBytes = super.weaveClass(name, bytes, mustWeave); + // Since 1.9.21.2, the AspectJ weaver, like other canonical Java instrumentation agents, returns null, + // if nothing was woven. We accommodate to that change here. + if (wovenBytes != null) + bytes = wovenBytes; } ((OSGiGeneratedClassHandler) this.generatedClassHandler)