File: fix_java9_compilation.patch

package info (click to toggle)
rdp-classifier 2.10.2-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 5,280 kB
  • sloc: java: 9,679; xml: 1,522; sh: 56; makefile: 20
file content (78 lines) | stat: -rw-r--r-- 4,456 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Subject: fix resource loading for Java 9
Description: resource loading modification for Java 9
Author: Olivier Sallou
Forwarded: no
Last-Updated: 2017-09-15
--- a/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TrainingInfoTest.java
+++ b/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TrainingInfoTest.java
@@ -55,7 +55,7 @@
     /** Test of createLogWordPriorArr method, of class classification.TrainingInfo. */
     public void testCreateLogWordPriorArr() throws Exception{
         System.out.println("testCreateLogWordPriorArr");
-        InputStream dstream = System.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
+        InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
         Reader in =  new InputStreamReader( dstream );
         
         TrainingInfo train = new TrainingInfo();
@@ -82,7 +82,7 @@
     /** Test of createGenusWordProbLis method, of class classification.TrainingInfo. */
     public void testCreateGenusWordProbList() throws Exception{
         System.out.println("testCreateGenusWordConditionalProbList");
-        InputStream dstream = System.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
+        InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
         Reader in =  new InputStreamReader( dstream );
         TrainingInfo train = new TrainingInfo();
         train.createGenusWordProbList(in);
@@ -104,7 +104,7 @@
     /** Test of makeProbIndexArr method, of class classification.TrainingInfo. */
     public void testCreateProbIndexArr() throws Exception {
         System.out.println("testCreateProbIndexArr");
-        InputStream dstream = System.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
+        InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
         Reader in =  new InputStreamReader( dstream );
         TrainingInfo train = new TrainingInfo();
         train.createProbIndexArr(in);
@@ -120,19 +120,19 @@
         System.out.println("testCreateClassifier");
         TrainingInfo train = new TrainingInfo();
         
-        InputStream dstream = System.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
+        InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
         Reader in =  new InputStreamReader( dstream );
         train.createGenusWordProbList(in);
         
-        dstream = System.class.getResourceAsStream("/test/classifier/test_bergeyTrainingTree.xml");
+        dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/test_bergeyTrainingTree.xml");
         in =  new InputStreamReader( dstream );
         train.createTree(in);
         
-        dstream = System.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
+        dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
         in =  new InputStreamReader( dstream );
         train.createProbIndexArr(in);
         
-        dstream = System.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
+        dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
         in =  new InputStreamReader( dstream );
         train.createLogWordPriorArr(in);
         
@@ -187,7 +187,7 @@
         
         
         // end of 
-        dstream = System.class.getResourceAsStream("/test/classifier/testQuerySeq.fasta");
+        dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testQuerySeq.fasta");
         in =  new InputStreamReader( dstream );
         BufferedReader infile = new BufferedReader(in);
         // test the first sequence
--- a/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TreeFileParserTest.java
+++ b/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TreeFileParserTest.java
@@ -39,7 +39,7 @@
   public void testParseTreeFile() throws Exception{
     System.out.println("testParseTreeFile");
     TreeFileParser parser = new TreeFileParser();
-    InputStream dstream = System.class.getResourceAsStream("/test/classifier/testTreeFile.xml");
+    InputStream dstream = TreeFileParserTest.class.getResourceAsStream("/test/classifier/testTreeFile.xml");
     HierarchyVersion hVersion = null;
     
     Reader in =  new InputStreamReader( dstream );