Deprecation of LogRecord.getMillis in JDK9

Daniel Fuchs daniel.fuchs at oracle.com
Mon Nov 30 18:11:04 UTC 2015


Hi Jason,


On 30/11/15 18:57, Jason Mehrens wrote:
> Sure.  I'm just trying to pick a path forward so that in X years when someone does code review (like my future self) can avoid, "What was this guy thinking calling such a SUPERSEDED, DANGEROUS, and CONDEMNED method?" when confronted with using getMillis.  I would assume JEP 277 would mark getMillis as SUPERSEDED only but, it still seems questionable that I would suppress the warning.  Which leads me toward removing the deprecation.

OK, I'll log an RFE for removing @Deprecated.
I agree we might have been too eager :-)

It won't prevent us to revisit later when JEP 277
is available, if it has a category that makes sense:
Something like "there's no problem using this method
but are you aware that using this other one is preferable?"

In the mean time let's restore getMillis() to standard API
and add an @apiNote instead of the @deprecated
comment.

best regards,

-- daniel


> Thanks,
>
> Jason
>
> ________________________________________
> From: Daniel Fuchs <daniel.fuchs at oracle.com>
> Sent: Monday, November 30, 2015 11:32 AM
> To: Jason Mehrens; Core-Libs-Dev
> Subject: Re: Deprecation of LogRecord.getMillis in JDK9
>
> Hi Jason,
>
> To complete my earlier reply:
>
> On 30/11/15 18:25, Daniel Fuchs wrote:
>> If it can't be undeprecated what is the proper way to target support as
>> low as JDK7 but might end up executing on JDK9?
>
> Well - a lib using LogRecord.getMillis() could
> use @SuppressWarnings("deprecation') when calling
> LogRecord.getMillis() - but was that your question?
>
> best regards,
>
> -- daniel
>




More information about the core-libs-dev mailing list