Security/permission problem

The J# group asked me to post this here.

I have a J# class BeanResult which inherits from Object (ie no declared parent class) and it does not have a ToString method so that inherits from Object.

Note, this is from java.lang.Object, not System.Object.

PermCalc gives the following listing which shows a permission request from ToString which means that every class will then require UnmanagedCode as every class eventually inherits from Object.

What is going on here?

<Type Name="BeanResult">
<Method Sig="instance void .ctor(string )" />
<Method Sig="instance void setColor(class Color )" />
<Method Sig="instance object MemberwiseClone()" />
<Method Sig="instance string ToString()">
<Demand>
<PermissionSet version="1" class="System.Security.PermissionSet">
<IPermission version="1" class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Flags="UnmanagedCode" />
</PermissionSet>
</Demand>
<Sandbox>
<PermissionSet version="1" class="System.Security.PermissionSet">
<IPermission version="1" class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" Flags="UnmanagedCode" />
</PermissionSet>
</Sandbox>
</Method>
</Type>

thanks - dave

[1670 byte] By [DavidThi808] at [2007-12-27]

.NET Development

Site Classified