File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/Java.Interop/Java.Interop Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ partial void SetMarshalMemberBuilder (CreationOptions options)
4848 var t = jie . GetType ( "Java.Interop.MarshalMemberBuilder" ) ;
4949 if ( t == null )
5050 throw new InvalidOperationException ( "Could not find Java.Interop.MarshalMemberBuilder from Java.Interop.Export.dll!" ) ;
51- var b = ( JniMarshalMemberBuilder ? ) Activator . CreateInstance ( t ) ;
52- marshalMemberBuilder = SetRuntime ( b ! ) ;
51+ var b = ( JniMarshalMemberBuilder ) Activator . CreateInstance ( t ) ! ;
52+ marshalMemberBuilder = SetRuntime ( b ) ;
5353 }
5454
5555 public abstract class JniMarshalMemberBuilder : IDisposable , ISetRuntime
@@ -87,7 +87,7 @@ public Delegate CreateMarshalToM
8787 {
8888 if ( value == null )
8989 throw new ArgumentNullException ( nameof ( value ) ) ;
90- return CreateMarshalToManagedExpression ( value . GetMethodInfo ( ) ! ) . Compile ( ) ;
90+ return CreateMarshalToManagedExpression ( value . GetMethodInfo ( ) ) . Compile ( ) ;
9191 }
9292
9393 public abstract LambdaExpression CreateMarshalToManagedExpression ( MethodInfo method ) ;
Original file line number Diff line number Diff line change @@ -290,7 +290,11 @@ static unsafe JavaVMInterface CreateInvoker (IntPtr handle)
290290 public virtual void FailFast ( string ? message )
291291 {
292292 var m = typeof ( Environment ) . GetMethod ( "FailFast" ) ;
293- m ? . Invoke ( null , new object ? [ ] { message } ) ;
293+
294+ if ( m is null )
295+ Environment . Exit ( 1 ) ;
296+
297+ m . Invoke ( null , new object ? [ ] { message } ) ;
294298 }
295299
296300 public override string ToString ( )
You can’t perform that action at this time.
0 commit comments