You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by GitBox <gi...@apache.org> on 2020/11/17 06:42:14 UTC

[GitHub] [tika] PeterAlfredLee opened a new pull request #385: Simplify some test code by using method TikaTest#getResource

PeterAlfredLee opened a new pull request #385:
URL: https://github.com/apache/tika/pull/385


   1. Add method `getResource` to `TikaTest`
   2. Simplify some test code by using method `TikaTest#getResource`


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] kkrugler merged pull request #385: Simplify some test code by using method TikaTest#getResourceAsUrl and TikaTest#getResourceAsUri

Posted by GitBox <gi...@apache.org>.
kkrugler merged pull request #385:
URL: https://github.com/apache/tika/pull/385


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] PeterAlfredLee commented on a change in pull request #385: Simplify some test code by using method TikaTest#getResource

Posted by GitBox <gi...@apache.org>.
PeterAlfredLee commented on a change in pull request #385:
URL: https://github.com/apache/tika/pull/385#discussion_r525680679



##########
File path: tika-core/src/test/java/org/apache/tika/TikaTest.java
##########
@@ -62,6 +62,15 @@
 
     protected static Parser AUTO_DETECT_PARSER = new AutoDetectParser();
 
+    /**
+     * Finds a resource with a given name.
+     * @param name name of the desired resource
+     * @return A {@link java.net.URL} object or null
+     */
+    public URL getResource(String name) {

Review comment:
       Sure. Will update change.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tika] kkrugler commented on a change in pull request #385: Simplify some test code by using method TikaTest#getResource

Posted by GitBox <gi...@apache.org>.
kkrugler commented on a change in pull request #385:
URL: https://github.com/apache/tika/pull/385#discussion_r525341903



##########
File path: tika-core/src/test/java/org/apache/tika/TikaTest.java
##########
@@ -62,6 +62,15 @@
 
     protected static Parser AUTO_DETECT_PARSER = new AutoDetectParser();
 
+    /**
+     * Finds a resource with a given name.
+     * @param name name of the desired resource
+     * @return A {@link java.net.URL} object or null
+     */
+    public URL getResource(String name) {

Review comment:
       A more descriptive name - like `getResourceAsUrl()` - would help when reading the code. Wondering if a `getResourceAsUri()` should also be added.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org