This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c0012c425 ISIS-3237: migrate from CGLIB to ByteBuddy
0c0012c425 is described below

commit 0c0012c4255b84b5726934fdb8da1bd769b5f6b1
Author: Andi Huber <[email protected]>
AuthorDate: Mon Oct 3 08:20:07 2022 +0200

    ISIS-3237: migrate from CGLIB to ByteBuddy
---
 extensions/core/executionoutbox/restclient/pom.xml |  5 ----
 viewers/wicket/viewer/pom.xml                      | 26 ----------------
 .../viewer/wicketapp/IsisWicketApplication.java    |  4 ++-
 .../wicket/viewer/integration/CglibTest.java       | 35 ----------------------
 4 files changed, 3 insertions(+), 67 deletions(-)

diff --git a/extensions/core/executionoutbox/restclient/pom.xml 
b/extensions/core/executionoutbox/restclient/pom.xml
index 0667deefa2..4fa1cbcf2e 100644
--- a/extensions/core/executionoutbox/restclient/pom.xml
+++ b/extensions/core/executionoutbox/restclient/pom.xml
@@ -219,11 +219,6 @@
                         <artifactId>activation</artifactId>
                         <version>1.1.1</version>
                     </dependency>
-                    <dependency>
-                        <groupId>cglib</groupId>
-                        <artifactId>cglib-nodep</artifactId>
-                        <version>3.3.0</version>
-                    </dependency>
                     <dependency>
                         <groupId>org.osgi</groupId>
                         <artifactId>org.osgi.core</artifactId>
diff --git a/viewers/wicket/viewer/pom.xml b/viewers/wicket/viewer/pom.xml
index 9acdfe474a..c45cab1244 100644
--- a/viewers/wicket/viewer/pom.xml
+++ b/viewers/wicket/viewer/pom.xml
@@ -55,13 +55,6 @@
         </resources>
     </build>
 
-       <repositories>
-               <repository>
-                       <id>jitpack.io</id>
-                       <url>https://jitpack.io</url>
-               </repository>
-       </repositories>
-
     <dependencies>
         <dependency>
             <groupId>org.apache.isis.viewer</groupId>
@@ -91,25 +84,6 @@
             </exclusions>
         </dependency>
 
-        <!-- Cglib patch START
-               as of 2021 Cglib seems inactive - while yet Wicket 8. and 9. 
rely on it
-               Cglib fails to initialize net.sf.cglib.core.ReflectUtils when 
running on JVM 16+
-               we utilize a jitpack.io build that is based on this patch
-               
https://github.com/rototor/cglib/commit/cc8632ed0930879b929b0d07e4ede5ac15103e9f
-               -->
-        <dependency>
-               <groupId>com.github.rototor</groupId>
-               <artifactId>cglib</artifactId>
-               <version>4516ac7b61</version>
-               <exclusions>
-                       <exclusion>
-                       <groupId>org.ow2.asm</groupId>
-                       <artifactId>asm</artifactId>
-                       </exclusion>
-               </exclusions>
-        </dependency>
-               <!-- Cglib patch END -->
-
         <dependency>
             <groupId>org.apache.wicket</groupId>
             <artifactId>wicket-auth-roles</artifactId>
diff --git 
a/viewers/wicket/viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/wicketapp/IsisWicketApplication.java
 
b/viewers/wicket/viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/wicketapp/IsisWicketApplication.java
index 659395ef86..bb050c7c0d 100644
--- 
a/viewers/wicket/viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/wicketapp/IsisWicketApplication.java
+++ 
b/viewers/wicket/viewer/src/main/java/org/apache/isis/viewer/wicket/viewer/wicketapp/IsisWicketApplication.java
@@ -63,8 +63,8 @@ import org.apache.isis.viewer.wicket.model.models.PageType;
 import org.apache.isis.viewer.wicket.ui.ComponentFactory;
 import org.apache.isis.viewer.wicket.ui.app.registry.ComponentFactoryRegistry;
 import 
org.apache.isis.viewer.wicket.ui.app.registry.HasComponentFactoryRegistry;
-import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.HasPageClassRegistry;
+import org.apache.isis.viewer.wicket.ui.pages.PageClassRegistry;
 import org.apache.isis.viewer.wicket.ui.pages.accmngt.AccountConfirmationMap;
 import org.apache.isis.viewer.wicket.ui.pages.login.WicketLogoutPage;
 import 
org.apache.isis.viewer.wicket.viewer.integration.AuthenticatedWebSessionForIsis;
@@ -126,6 +126,8 @@ implements
     // -- CONSTRUCTION
 
     public IsisWicketApplication() {
+        // equivalent of -Dwicket.ioc.useByteBuddy=true (as opposed to using 
CGLIB)
+        System.setProperty("wicket.ioc.useByteBuddy", "true");
     }
 
     /**
diff --git 
a/viewers/wicket/viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/integration/CglibTest.java
 
b/viewers/wicket/viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/integration/CglibTest.java
deleted file mode 100644
index 88e6b0ed9f..0000000000
--- 
a/viewers/wicket/viewer/src/test/java/org/apache/isis/viewer/wicket/viewer/integration/CglibTest.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-package org.apache.isis.viewer.wicket.viewer.integration;
-
-import org.junit.jupiter.api.Test;
-
-class CglibTest {
-
-    /**
-     * particularly useful if run on the JVM of interest
-     */
-    @Test
-    void canInitCglib() {
-        // expected not to throw
-        new net.sf.cglib.proxy.Enhancer();
-        net.sf.cglib.core.ReflectUtils.getClassInfo(this.getClass());
-    }
-
-}

Reply via email to