RFR: 8173898: StackWalker.walk throws InternalError if called from a constructor invoked through reflection.

Daniel Fuchs daniel.fuchs at oracle.com
Wed Feb 8 16:17:22 UTC 2017


On 08/02/17 15:58, Mandy Chung wrote:
>> I disagree: the text starts by saying:
>> "By default reflection frames are hidden. The reflection
>> frames include […]"
> 209          * Shows all reflection frames.
>
> This is the first sentence.  line 216-217 repeats line 209.
>
>> but the sentence at lines 216-217 is the only place where we say what
>> the option actually does: it shows all reflection frames.
>> I think it's needed.
>> Possibly the sentence at lines 216-217 could be moved to become
>> the first sentence in the doc comment, but I'd rather not change
>> it now that the CCC has approved the doc changes as in webrev.03.
> This does not change the spec and this is minor rewording.  No need to update CCC.
>
> What about:
>
> Shows all reflection frames.
>
> <p>By default, reflection frames are hidden.  A {@code StackWalker} with this {@code SHOW_REFLECT_FRAMES} option will show the reflection frames that include ….

Oh - you're right! I missed it.

I have made this change in my workspace:
http://cr.openjdk.java.net/~dfuchs/webrev_8173898/webrev.05/

         /**
          * Shows all reflection frames.
          *
          * <p>By default, reflection frames are hidden.  A {@code 
StackWalker}
          * configured with this {@code SHOW_REFLECT_FRAMES} option
          * will show all reflection frames that
          * include {@link java.lang.reflect.Method#invoke} and
          * {@link java.lang.reflect.Constructor#newInstance(Object...)}
          * and their reflection implementation classes.

best regards,

-- daniel



More information about the core-libs-dev mailing list