Skip to content

Commit

Permalink
Merge branch 'develop' into lbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
wasabii authored Jun 13, 2024
2 parents 5baa65a + a3327e6 commit cbfa614
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 32 deletions.
51 changes: 22 additions & 29 deletions src/IKVM.Runtime/Java/Externs/java/io/WinNTFileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -540,40 +540,33 @@ public static string[] list(object self, object f)
#if FIRST_PASS
throw new NotImplementedException();
#else
try
if (JVM.Vfs.IsPath(((global::java.io.File)f).getPath()))
{
if (JVM.Vfs.IsPath(((global::java.io.File)f).getPath()))
{
if (JVM.Vfs.GetEntry(((global::java.io.File)f).getPath()) is VfsDirectory vfs)
return vfs.List();
if (JVM.Vfs.GetEntry(((global::java.io.File)f).getPath()) is VfsDirectory vfs)
return vfs.List();

return null;
return null;
}
else
{
__callerID ??= global::ikvm.@internal.CallerID.create(WinNTFileSystemAccessor.Type.TypeHandle);
__jniPtr__list ??= Marshal.GetDelegateForFunctionPointer<__jniDelegate__list>(JNIFrame.GetFuncPtr(__callerID, "java/io/WinNTFileSystem", nameof(list), "(Ljava/io/File;)[Ljava/lang/String;"));
var jniFrm = new JNIFrame();
var jniEnv = jniFrm.Enter(__callerID);
try
{
return (string[])jniFrm.UnwrapLocalRef(__jniPtr__list(jniEnv, jniFrm.MakeLocalRef(self), jniFrm.MakeLocalRef(f)));
}
else
catch (Exception ex)
{
__callerID ??= global::ikvm.@internal.CallerID.create(WinNTFileSystemAccessor.Type.TypeHandle);
__jniPtr__list ??= Marshal.GetDelegateForFunctionPointer<__jniDelegate__list>(JNIFrame.GetFuncPtr(__callerID, "java/io/WinNTFileSystem", nameof(list), "(Ljava/io/File;)[Ljava/lang/String;"));
var jniFrm = new JNIFrame();
var jniEnv = jniFrm.Enter(__callerID);
try
{
return (string[])jniFrm.UnwrapLocalRef(__jniPtr__list(jniEnv, jniFrm.MakeLocalRef(self), jniFrm.MakeLocalRef(f)));
}
catch (Exception ex)
{
System.Console.WriteLine("*** exception in native code ***");
System.Console.WriteLine(ex);
throw;
}
finally
{
jniFrm.Leave();
}
System.Console.WriteLine("*** exception in native code ***");
System.Console.WriteLine(ex);
throw;
}
finally
{
jniFrm.Leave();
}
}
catch (global::java.lang.NegativeArraySizeException e)
{
throw new global::java.lang.NegativeArraySizeException("listing " + ((global::java.io.File)f).getPath());
}
#endif
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="MSTest.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<RunSettingsFilePath>$(MSBuildProjectDirectory)\IKVM.Tools.Exporter.Tests.runsettings</RunSettingsFilePath>
</PropertyGroup>

<ItemGroup>
Expand Down Expand Up @@ -56,4 +57,10 @@
</IncludeProjectReference>
</ItemGroup>

<ItemGroup>
<None Update="IKVM.Tools.Exporter.Tests.runsettings">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<RunSettings>
<RunConfiguration>
<DisableAppDomain>True</DisableAppDomain>
</RunConfiguration>
<MSTest>
<DisableAppDomain>True</DisableAppDomain>
</MSTest>
</RunSettings>
11 changes: 9 additions & 2 deletions src/IKVM.Tools.Importer.Tests/IKVM.Tools.Importer.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="MSTest.Sdk">
<PropertyGroup>
<TargetFrameworks>net472;net6.0;net8.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<RunSettingsFilePath>$(MSBuildProjectDirectory)\IKVM.Tools.Importer.Tests.runsettings</RunSettingsFilePath>
</PropertyGroup>

<ItemGroup>
Expand All @@ -16,7 +17,7 @@
<ItemGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net461'))">
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\IKVM.Java.Tests.Util\IKVM.Java.Tests.Util.csproj" />
<ProjectReference Include="..\IKVM.Runtime\IKVM.Runtime.csproj" />
Expand Down Expand Up @@ -67,5 +68,11 @@
</IncludeProjectReference>
</ItemGroup>

<ItemGroup>
<None Update="IKVM.Tools.Importer.Tests.runsettings">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<Import Project="$(MSBuildThisFileDirectory)..\..\IKVM.refs.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<RunSettings>
<RunConfiguration>
<DisableAppDomain>True</DisableAppDomain>
</RunConfiguration>
<MSTest>
<DisableAppDomain>True</DisableAppDomain>
</MSTest>
</RunSettings>

0 comments on commit cbfa614

Please sign in to comment.