use ExceptionUtil.rethrow to reduce stack trace

This commit is contained in:
Vladimir Krivosheev
2017-02-03 16:59:31 +01:00
parent f6301b606e
commit f442b836fe
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2016 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,7 +28,10 @@ import org.jetbrains.annotations.Nullable;
import java.lang.annotation.Annotation;
import java.lang.reflect.*;
import java.util.*;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Set;
public class ReflectionUtil {
private static final Logger LOG = Logger.getInstance("#com.intellij.util.ReflectionUtil");
@@ -445,12 +448,17 @@ public class ReflectionUtil {
exception = e1;
}
}
throw new RuntimeException(exception);
ExceptionUtil.rethrow(exception);
}
}
throw new RuntimeException(e);
ExceptionUtil.rethrow(e);
}
// error will be thrown
//noinspection ConstantConditions
return null;
}
@NotNull