2

I just saw Sample Code to Demonstrate Bug with Reflection API:

link to oracle bug report ... Could somebody demonstrate this bug with a simple code, just for me to check if my code is a victim of this bug?

Now I am wondering: is this a valid question? If not, what to do about it?

(And yes, I am kind if wondering if such a question would have closed as "too localized" whilst that category existed, but that is not the real point here.)

3
  • 1
    No, we got rid of that close reason for a reason. There's no need to dwell on the past. Evaluate it in the now instead.
    – Makoto
    Jul 21, 2017 at 15:22
  • Not sure if you noticed, but I first asked Now I am wondering - is this a valid question? If not, what to do about.
    – GhostCat
    Jul 21, 2017 at 15:24
  • 3
    It might be useful to you to remove the "localized" bits then. Since that doesn't exist now, it'd only serve to confuse others in the future.
    – Makoto
    Jul 21, 2017 at 15:25

1 Answer 1

4

Thing is, this question has a chance of being salvageable. The OP is just asking this in the wrong order.

The main issue is that the OP is afflicted by what they believe to be a bug in the JVM. Instead of posting their code for us to independently verify and test, they're asking us to provide them code so that they can validate their assertions.

The issue with this is that it's burden of proof; as is, we can't write that kind of code for them on-demand, and so it'd be suitable to close as "too broad". However, it's not too broad for them to ask something analogous to, "What's wrong with this code?" in the same vein as a debugging problem.

I'll let the OP know about this Meta discussion, and ask them to reverse the order of their question. It could be on-topic, it just needs to be rephrased.

8
  • For the record: there is already a comment with a link to this question on that other question.
    – GhostCat
    Jul 21, 2017 at 15:26
  • @GhostCat: One that wasn't written by me?
    – Makoto
    Jul 21, 2017 at 15:27
  • The one written by me starting with I am saying that I find your question so special that I am asking my self if it "belongs" here. And as I got curious about, I put up a question on meta. ... that meta being a link. So, yes. Exactly. One not written by you.
    – GhostCat
    Jul 21, 2017 at 15:30
  • @GhostCat: Guess I didn't see it. The link was fairly tiny. Okay then!
    – Makoto
    Jul 21, 2017 at 15:31
  • Hmm, I sort of follow the logic here, but in a way it seems like you are making the question more localized, rather than less. Isn't it more general and therefore more useful to simply ask for code that would reproduce a bug, than to present some specific code and ask whether it is vulnerable to a bug? What if I have code that is similar to the code in the question, but subtly different. The Q&A then becomes less useful to me, because I don't know if the subtle differences in our code are important.
    – Cody Gray Mod
    Jul 21, 2017 at 16:18
  • 1
    @CodyGray: The problem there is that, as presented initially, the problem is one that involves debugging. Initially yes, this may make it more localized to that individual, but if the OP can isolate the specific code that reproduces the JVM bug, and it's actually a JVM bug, then it would apply broadly. If it weren't a bug, then it'd fall into the same bucket of debugging questions we already have here, which do have their own value and niches here. The key here is isolation. The OP has to do their diligence in isolating their code which they believe exhibits the bug.
    – Makoto
    Jul 21, 2017 at 16:28
  • So, would you say that "Can you provide repro code for this bug?" is completely off-topic? Because I'm not sure I agree with that blanket statement, and it kinda seems like that's what he's asking.
    – Cody Gray Mod
    Jul 21, 2017 at 16:32
  • @CodyGray: Suppose it turned out not to be a JVM bug. It'd be nice to be able to assert that before we invested any kind of time authoring any kind of demonstration code of an actual JVM problem. It feels like a stealth XY problem in that the OP has said that there's a bug, but we can't validate that claim since we haven't seen their code to really see if there's a bug. Now that the OP has actually posted an answer, it seems to be a symptom of the diamond problem with interfaces. Better to ask the OP questions first than to guess.
    – Makoto
    Jul 21, 2017 at 16:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .