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

ASF GitHub Bot commented on OPENNLP-1171:
-----------------------------------------

kottmann commented on a change in pull request #298: OPENNLP-1171: some tests 
create temp files and directories but never …
URL: https://github.com/apache/opennlp/pull/298#discussion_r157755535
 
 

 ##########
 File path: opennlp-tools/src/main/java/opennlp/tools/util/FileUtil.java
 ##########
 @@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package opennlp.tools.util;
+
+import java.io.File;
+
+public class FileUtil {
+
+  /**
+   * delete the specified directory and its child directories and files
+   * @param file specify the file or directory to be deleted
+   */
+  public static void deleteDirectory(File file) {
 
 Review comment:
   +1 to not have it as part of public API, should be in test.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> some tests create temp files and directories but never delete them
> ------------------------------------------------------------------
>
>                 Key: OPENNLP-1171
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1171
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Build, Packaging and Test
>    Affects Versions: 1.8.3
>            Reporter: Koji Sekiguchi
>            Assignee: Koji Sekiguchi
>            Priority: Minor
>             Fix For: 1.8.4
>
>
> Some temporary files and directories that are created in some tests are never 
> deleted and the number of temporary files/directories is increasing after 
> running mvn clean test.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to