lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dawid Weiss (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-8481) Javadocs should no longer reference RAMDirectory
Date Tue, 04 Sep 2018 08:03:00 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-8481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16602714#comment-16602714
] 

Dawid Weiss commented on LUCENE-8481:
-------------------------------------

I agree we should fix javadocs too, they're stale. As for removal at the end: it's really
an arbitrary decision. I though we could introduce a real temp dir (and a local variable)
so that the example would work on Windows and other systems; then the IOUtils.rm(indexLocation)
would actually refer to the variable (not hardcoded path), so chances of copy-pasting and
doing an {{rm -rf /}} are slim and you don't leave unused stuff in the temp folder. Having
an rm at the end seems cleaner to me and if you really copy-paste _so_ badly as to introduce
a wrong path there... then you deserve the consequences?

> Javadocs should no longer reference RAMDirectory
> ------------------------------------------------
>
>                 Key: LUCENE-8481
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8481
>             Project: Lucene - Core
>          Issue Type: Task
>            Reporter: Adrien Grand
>            Priority: Minor
>
> Since RAMDirectory is deprecated, we shouldn't show examples using it anymore. See eg.
https://github.com/apache/lucene-solr/blob/a1ec716e107807f1dc24923cc7a91d0c5e64a7e1/lucene/core/src/java/overview.html#L36.
cc [~dweiss]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message