This commit is contained in:
jfrijters 2005-05-24 08:45:37 +00:00
Родитель 529108bd40
Коммит 2a946f97ee
2 изменённых файлов: 41 добавлений и 24 удалений

Просмотреть файл

@ -243,12 +243,14 @@
../../classpath/gnu/CORBA/recursiveTypeCode.java
../../classpath/gnu/CORBA/Restricted_ORB.java
../../classpath/gnu/CORBA/Simple_delegate.java
../../classpath/gnu/CORBA/ServiceDetailHolder.java
../../classpath/gnu/CORBA/streamRequest.java
../../classpath/gnu/CORBA/stringTypeCode.java
../../classpath/gnu/CORBA/stubFinder.java
../../classpath/gnu/CORBA/TypeCodeHelper.java
../../classpath/gnu/CORBA/typeNamer.java
../../classpath/gnu/CORBA/Unexpected.java
../../classpath/gnu/CORBA/universalHolder.java
../../classpath/gnu/CORBA/Version.java
../../classpath/gnu/CORBA/WCharHolder.java
../../classpath/gnu/CORBA/WStringHolder.java
@ -2889,6 +2891,7 @@
../../classpath/org/omg/CORBA/DoubleHolder.java
../../classpath/org/omg/CORBA/DoubleSeqHelper.java
../../classpath/org/omg/CORBA/DoubleSeqHolder.java
../../classpath/org/omg/CORBA/DynamicImplementation.java
../../classpath/org/omg/CORBA/DynAny.java
../../classpath/org/omg/CORBA/DynAnyPackage/Invalid.java
../../classpath/org/omg/CORBA/DynAnyPackage/InvalidSeq.java
@ -2968,6 +2971,12 @@
../../classpath/org/omg/CORBA/PUBLIC_MEMBER.java
../../classpath/org/omg/CORBA/Request.java
../../classpath/org/omg/CORBA/SetOverrideType.java
../../classpath/org/omg/CORBA/ServerRequest.java
../../classpath/org/omg/CORBA/ServiceDetail.java
../../classpath/org/omg/CORBA/ServiceDetailHelper.java
../../classpath/org/omg/CORBA/ServiceInformation.java
../../classpath/org/omg/CORBA/ServiceInformationHelper.java
../../classpath/org/omg/CORBA/ServiceInformationHolder.java
../../classpath/org/omg/CORBA/ShortHolder.java
../../classpath/org/omg/CORBA/ShortSeqHelper.java
../../classpath/org/omg/CORBA/ShortSeqHolder.java

Просмотреть файл

@ -46,23 +46,15 @@ final class ExceptionHelper
private cli.System.Diagnostics.StackTrace tracePart2;
private cli.System.Collections.ArrayList stackTrace;
private Throwable cause;
private cli.System.WeakReference original;
private Throwable original;
ExceptionInfoHelper()
{
cause = CAUSE_NOT_SET;
}
ExceptionInfoHelper(Throwable x, Throwable org)
ExceptionInfoHelper(Throwable x)
{
if(org != null)
{
// TODO to prevent a memory leak, we must use a WeakReference here, but it is not
// actually correct because it will allow the original to be collected to early.
// This problem will be resolved when we move the state for Java exceptions into
// java.lang.Throwable.
original = new cli.System.WeakReference(org);
}
tracePart1 = new cli.System.Diagnostics.StackTrace(x, true);
tracePart2 = new cli.System.Diagnostics.StackTrace(true);
cause = getInnerException(x);
@ -83,11 +75,14 @@ final class ExceptionHelper
Throwable getOriginal()
{
if(original != null)
{
return (Throwable)original.get_Target();
}
return null;
Throwable org = original;
original = null;
return org;
}
void setOriginal(Throwable org)
{
original = org;
}
Throwable getCauseForSerialization(Throwable t)
@ -557,9 +552,9 @@ final class ExceptionHelper
t = remapped;
}
}
else
else if(remapped != NOT_REMAPPED)
{
t = remapped == NOT_REMAPPED ? t : remapped;
t = remapped;
}
}
}
@ -568,13 +563,26 @@ final class ExceptionHelper
{
if(t != org || nonJavaException)
{
// the exception is escaping into the wild for the first time,
// so we have to capture the stack trace
exceptions.put(t, new ExceptionInfoHelper(org, t != org ? org : null));
Throwable inner = getInnerException(org);
if(inner != null && !exceptions.containsKey(inner))
ExceptionInfoHelper eih = t != org ? (ExceptionInfoHelper)exceptions.get(t) : null;
if(eih == null)
{
exceptions.put(inner, new ExceptionInfoHelper(inner, null));
// the exception is escaping into the wild for the first time,
// so we have to capture the stack trace
eih = new ExceptionInfoHelper(org);
if(t != org)
{
eih.setOriginal(org);
}
exceptions.put(t, eih);
Throwable inner = getInnerException(org);
if(inner != null && !exceptions.containsKey(inner))
{
exceptions.put(inner, new ExceptionInfoHelper(inner));
}
}
else
{
eih.setOriginal(org);
}
}
else
@ -582,7 +590,7 @@ final class ExceptionHelper
ExceptionInfoHelper eih = (ExceptionInfoHelper)exceptions.get(t);
if(eih == null)
{
eih = new ExceptionInfoHelper(t, null);
eih = new ExceptionInfoHelper(t);
exceptions.put(t, eih);
}
else