Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wb-dev] Critical issue

Hi Laurent,

Thank you for working on this. I looked at it as well and came to the same conclusion (not easy).

Yes it is relevant, I can imagine that WB has to instantiate a class, filter out error methods, visualizing user widgets, and more of that magic.

Cheers,

Wim


On Thu, Mar 25, 2021 at 8:10 PM Laurent Caron <laurent.caron@xxxxxxxxx> wrote:
Hi Wim,

I've started the analysis, and bad news, it is not easy. CGLIB is used for different cases :
a) Object creation (for example in BroadcastSupport)
b) Abstract class instantiation : an object that extends an abstract class can be instantiated: abstract methods are "empty" and returns the default value
c) Method interception (AOP), to override some behaviours (for example in SectionPartInfo)
d) Injection of classes in the classloader (for example in BindingContextClassLoaderInitializer)

IMHO, byte manipulation library is relevant in WindowBuilder, so I think we should investigate replacing CGLib by ByteBuddy or Javassist.

Regards,

Laurent


Le mer. 24 mars 2021 à 12:11, Wim Jongman <wim.jongman@xxxxxxxxx> a écrit :
Hi Laurent,

Yes, bytebuddy seems to be the alternative. But we first need to figure out what WB is trying to do.

There are 26 classes that use cglib:

AbstractParseFactory.java - org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/parser
AbstractVariableSupportTest.java - org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/model/variables (2 matches)
ActionContainerInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/jface/action (3 matches)
ActionFactoryCreationSupport.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/rcp (3 matches)
ActionTest.java - org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/rcp/model/jface (3 matches)
ActivatorGetImagesByteCodeProcessor.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/util
AstEvaluationEngine.java - org.eclipse.wb.core.java/src/org/eclipse/wb/core/eval
BindingContextClassLoaderInitializer.java - org.eclipse.wb.rcp.databinding/src/org/eclipse/wb/internal/rcp/databinding/parser
BroadcastSupport.java - org.eclipse.wb.core/src/org/eclipse/wb/core/model/broadcast (3 matches)
ContributionManagerInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/jface/action (2 matches)
DefaultMethodInterceptor.java - org.eclipse.wb.core.java/src/org/eclipse/wb/core/eval (2 matches)
DialogInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/widgets (4 matches)
ExecutionFlowUtils.java - org.eclipse.wb.core.java/src/org/eclipse/wb/core/eval (3 matches)
FormPageInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/forms (3 matches)
FrameViewInfo.java - org.eclipse.wb.swing.jsr296/src/org/eclipse/wb/internal/swing/jsr296/model (3 matches)
GroupMarkerInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/jface/action (2 matches)
InvocationEvaluator.java - org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/eval/evaluators (2 matches)
JavaInfoUtilsTest.java - org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/model/util (3 matches)
PageLayoutCreateFolderInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/rcp/perspective (3 matches)
PageLayoutCreationSupport.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/rcp/perspective (3 matches)
ReflectionUtilsTest.java - org.eclipse.wb.tests/src/org/eclipse/wb/tests/designer/core/util/reflect (16 matches)
ResourceManagerClassLoaderInitializer.java - org.eclipse.wb.swt/src/org/eclipse/wb/internal/swt/utils (3 matches)
SectionPartInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/forms (3 matches)
ThisCreationSupport.java - org.eclipse.wb.core.java/src/org/eclipse/wb/internal/core/model/creation (7 matches)
ToolBarManagerInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/jface/action (2 matches)
WizardPageInfo.java - org.eclipse.wb.rcp/src/org/eclipse/wb/internal/rcp/model/jface (2 matches)

On Wed, Mar 24, 2021 at 8:19 AM Laurent Caron <laurent.caron@xxxxxxxxx> wrote:
Hi Wim,

Maybe adding " --illegal-access=permit" in the Eclipse Configuration can be a workaround.

The problem seems to be well known (look at [1],[2], [3]) since about 3 years.

Should be move to another library, like ByteBuddy ?

I have no idea of the impact (how many classes in WB rely on CGLib).

Regards

Laurent


Le mar. 23 mars 2021 à 20:57, Wim Jongman <wim.jongman@xxxxxxxxx> a écrit :
Hi All,

With Java 16, the usage of CGLIB stops working. We already had our first report [1]

CGLIB is a class manipulation tool that uses reflection to do some class/classloading/proxy magic.

If we don't get this fixed then we are in trouble. Is there someone on the list that wants to take a stab at this?

Cheers,

Wim


_______________________________________________
wb-dev mailing list
wb-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/wb-dev
_______________________________________________
wb-dev mailing list
wb-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/wb-dev
_______________________________________________
wb-dev mailing list
wb-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/wb-dev
_______________________________________________
wb-dev mailing list
wb-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/wb-dev

Back to the top