Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update JAR management reporting classes not identified #551

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/net/JNetReflector/InternalExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
using System.Text.RegularExpressions;
using Org.Mases.Jnet;
using System.Diagnostics;
using MASES.JCOBridge.C2JBridge;

namespace MASES.JNetReflector
{
Expand Down Expand Up @@ -432,11 +433,16 @@ public static string JVMFullQualifiedClassName(this ZipArchiveEntry entry)

public static Class JVMClass(this ZipArchiveEntry entry)
{
var cName = entry.JVMFullQualifiedClassName();
try
{
var cName = entry.JVMFullQualifiedClassName();
return Class.ForName(cName, true, Class.SystemClassLoader);
}
catch (JVMBridgeException cnfe)
{
ReflectionUtils.ReportTrace(ReflectionUtils.ReflectionTraceLevel.Error, $"JVMClass: {cnfe.GetType().Name} loading {cName} with message: {cnfe.Message}");
return null;
}
catch
{
return null;
Expand Down
8 changes: 8 additions & 0 deletions src/net/JNetReflector/JNetReflector.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@
<ItemGroup>
<Compile Include="..\JNet\Developed\Java\Lang\Annotation\Annotation.cs" Link="Java\Lang\Annotation\Annotation.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Class.cs" Link="Java\Lang\Class.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\ClassFormatError.cs" Link="Java\Lang\ClassFormatError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\ClassLoader.cs" Link="Java\Lang\ClassLoader.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\ClassNotFoundException.cs" Link="Java\Lang\ClassNotFoundException.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Error.cs" Link="Java\Lang\Error.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Exception.cs" Link="Java\Lang\Exception.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Iterable.cs" Link="Java\Lang\Iterable.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\LinkageError.cs" Link="Java\Lang\LinkageError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Module.cs" Link="Java\Lang\Module.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\NoClassDefFoundError.cs" Link="Java\Lang\NoClassDefFoundError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\NoSuchMethodException.cs" Link="Java\Lang\NoSuchMethodException.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Object.cs" Link="Java\Lang\Object.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Package.cs" Link="Java\Lang\Package.cs" />
Expand All @@ -77,8 +82,11 @@
<Compile Include="..\JNet\Developed\Java\Lang\Reflect\Type.cs" Link="Java\Lang\Reflect\Type.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Reflect\TypeVariable.cs" Link="Java\Lang\Reflect\TypeVariable.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Reflect\WildcardType.cs" Link="Java\Lang\Reflect\WildcardType.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\RuntimeException.cs" Link="Java\Lang\RuntimeException.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\SecurityManager.cs" Link="Java\Lang\SecurityManager.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\Throwable.cs" Link="Java\Lang\Throwable.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\UnsupportedClassVersionError.cs" Link="Java\Lang\UnsupportedClassVersionError.cs" />
<Compile Include="..\JNet\Developed\Java\Lang\UnsupportedOperationException.cs" Link="Java\Lang\UnsupportedOperationException.cs" />
<Compile Include="..\JNet\Developed\Java\Util\Collection.cs" Link="Java\Util\Collection.cs" />
<Compile Include="..\JNet\Developed\Java\Util\Iterator.cs" Link="Java\Util\Iterator.cs" />
<Compile Include="..\JNet\JNetCoreBase.cs" Link="JNetCoreBase.cs" />
Expand Down