File java17.patch of Package manifold

--- manifold-2025.1.21/manifold-deps-parent/manifold-delegation/src/main/java/manifold/ext/delegation/DelegationProcessor.java	2025-06-13 08:40:01.426386498 +0200
+++ manifold-2025.1.21/manifold-deps-parent/manifold-delegation/src/main/java/manifold/ext/delegation/DelegationProcessor.java	2025-06-13 09:09:19.567945180 +0200
@@ -1716,9 +1716,7 @@
 
   private static Type getUnderlyingType( Type type )
   {
-    return isJava8()
-      ? type.unannotatedType()
-      : (Type)ReflectUtil.method( type, "stripMetadata" ).invoke();
+    return (Type)ReflectUtil.method( type, "stripMetadata" ).invoke();
   }
 
   private void reportWarning( JCTree location, String message )
--- manifold-2025.1.21/manifold-deps-parent/manifold-ext/src/main/java/manifold/ext/ExtensionTransformer.java	2025-06-13 08:40:01.435279841 +0200
+++ manifold-2025.1.21/manifold-deps-parent/manifold-ext/src/main/java/manifold/ext/ExtensionTransformer.java	2025-06-13 08:46:14.973071894 +0200
@@ -1036,11 +1036,11 @@
       Env<AttrContext> env = new AttrContextEnv( tree, new AttrContext() );
       env.toplevel = (JCTree.JCCompilationUnit)_tp.getCompilationUnit();
       env.enclClass = getEnclosingClass( tree );
-      if( JreUtil.isJava8() )
+/*      if( JreUtil.isJava8() )
       {
         binary.operator = resolveMethod( tree.pos(), Names.instance( _tp.getContext() ).fromString( binary.getTag() == JCTree.Tag.PLUS ? "+" : "-" ), _tp.getSymtab().predefClass.type, List.of( binary.lhs.type, binary.rhs.type ) );
       }
-      else
+      else */
       {
         //reflective: binary.operator = Operators.instance( _tp.getContext ).resolveBinary( ... );
         Object operators = ReflectUtil.method( "com.sun.tools.javac.comp.Operators", "instance", Context.class ).invokeStatic( _tp.getContext() );
@@ -2872,9 +2872,7 @@
 
   private static Type getUnderlyingType( Type type )
   {
-    return isJava8()
-      ? type.unannotatedType()
-      : (Type)ReflectUtil.method( type, "stripMetadata" ).invoke();
+    return (Type)ReflectUtil.method( type, "stripMetadata" ).invoke();
   }
 
   private JCTree.JCMethodInvocation replaceWithReflection( JCTree.JCMethodInvocation tree )
--- manifold-2025.1.21/manifold-deps-parent/manifold-ext-rt/src/main/java/manifold/ext/rt/proxy/Proxy.java	2025-06-13 08:40:01.430305419 +0200
+++ manifold-2025.1.21/manifold-deps-parent/manifold-ext-rt/src/main/java/manifold/ext/rt/proxy/Proxy.java	2025-06-13 08:41:15.265492389 +0200
@@ -26,8 +26,8 @@
 
 import manifold.util.JreUtil;
 import manifold.util.ReflectUtil;
-import sun.reflect.CallerSensitive;
-import sun.reflect.Reflection;
+import jdk.internal.reflect.CallerSensitive;
+import jdk.internal.reflect.Reflection;
 
 /**
  * Adapted from java.lang.reflect.Proxy to remove the CHECKCAST instruction if the return type is a Structural interface,
--- manifold-2025.1.21/manifold-deps-parent/manifold-preprocessor/src/main/java/manifold/preprocessor/expression/RelationalExpression.java	2025-06-13 08:40:01.449454590 +0200
+++ manifold-2025.1.21/manifold-deps-parent/manifold-preprocessor/src/main/java/manifold/preprocessor/expression/RelationalExpression.java	2025-06-13 09:14:49.841950239 +0200
@@ -16,7 +16,6 @@
 
 package manifold.preprocessor.expression;
 
-import com.sun.corba.se.spi.ior.IdentifiableFactory;
 import com.sun.tools.javac.util.JCDiagnostic;
 import com.sun.tools.javac.util.Log;
 import manifold.internal.javac.IDynamicJdk;
--- manifold-2025.1.21/manifold-deps-parent/manifold-props/src/main/java/manifold/ext/props/PropertyProcessor.java	2025-06-13 08:40:01.453645607 +0200
+++ manifold-2025.1.21/manifold-deps-parent/manifold-props/src/main/java/manifold/ext/props/PropertyProcessor.java	2025-06-13 09:17:31.147456431 +0200
@@ -2048,14 +2048,14 @@
       Env<AttrContext> env = new AttrContextEnv( tree, new AttrContext() );
       env.toplevel = (JCTree.JCCompilationUnit)getCompilationUnit();
       env.enclClass = ExtensionTransformer.getEnclosingClass( tree, child -> getParent( child ) );
-      if( JreUtil.isJava8() )
+/*      if( JreUtil.isJava8() )
       {
         binary.operator = ExtensionTransformer
           .resolveMethod( getContext(), getCompilationUnit(), tree.pos(),
             Names.instance( getContext() ).fromString( binary.getTag() == Tag.PLUS ? "+" : "-" ),
             getSymtab().predefClass.type, List.of( binary.lhs.type, binary.rhs.type ) );
       }
-      else
+      else */
       {
         //reflective: binary.operator = Operators.instance( _tp.getContext ).resolveBinary( ... );
         Object operators = ReflectUtil.method( "com.sun.tools.javac.comp.Operators", "instance", Context.class )
openSUSE Build Service is sponsored by