File: deactivate_classgraph.patch

package info (click to toggle)
jalview 2.11.4.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 445,392 kB
  • sloc: java: 365,549; xml: 2,989; sh: 1,511; perl: 336; lisp: 139; python: 116; makefile: 81; haskell: 60
file content (172 lines) | stat: -rw-r--r-- 4,637 bytes parent folder | download | duplicates (2)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
Description: avoid using classgraph, not needed to find the Debian jar
Author: Pierre Gruet <pgt@debian.org>
Forwarded: not-needed
Last-Update: 2020-11-16

--- a/test/jalview/bin/CommandLineOperations.java
+++ b/test/jalview/bin/CommandLineOperations.java
@@ -37,9 +37,6 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import io.github.classgraph.ClassGraph;
-import io.github.classgraph.ModuleRef;
-import io.github.classgraph.ScanResult;
 import jalview.gui.JvOptionPane;
 
 public class CommandLineOperations
@@ -119,49 +116,18 @@
     }
   }
 
-  private static ClassGraph scanner = null;
-
   private static String classpath = null;
 
   private static String modules = null;
 
   private static String java_exe = null;
 
-  public synchronized static String getClassPath()
-  {
-    if (scanner == null)
-    {
-      scanner = new ClassGraph();
-      ScanResult scan = scanner.scan();
-      classpath = scan.getClasspath();
-      modules = "";
-      for (ModuleRef mr : scan.getModules())
-      {
-        modules.concat(mr.getName());
-      }
-      java_exe = System.getProperty("java.home") + File.separator + "bin"
-              + File.separator + "java";
-
-    }
-    while (classpath == null)
-    {
-      try
-      {
-        Thread.sleep(10);
-      } catch (InterruptedException x)
-      {
-
-      }
-    }
-    return classpath;
-  }
-
   public static Worker getJalviewDesktopRunner(boolean withAwt, String cmd,
           int timeout)
   {
     // Note: JAL-3065 - don't include quotes for lib/* because the arguments are
     // not expanded by the shell
-    String classpath = getClassPath();
+    String classpath = new String("/usr/share/java/jalview.jar");
     String _cmd = java_exe + " "
             + (withAwt ? "-Djava.awt.headless=true" : "") + " -classpath "
             + classpath
--- a/test/jalview/bin/HiDPISettingTest2.java
+++ b/test/jalview/bin/HiDPISettingTest2.java
@@ -35,8 +35,6 @@
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
-import io.github.classgraph.ClassGraph;
-import io.github.classgraph.ScanResult;
 import jalview.gui.Desktop;
 import jalview.util.Platform;
 
@@ -94,39 +92,13 @@
     }
   }
 
-  private static ClassGraph scanner = null;
-
   private static String classpath = null;
 
   private static String java_exe = null;
 
-  public synchronized static String getClassPath()
-  {
-    if (scanner == null)
-    {
-      scanner = new ClassGraph();
-      ScanResult scan = scanner.scan();
-      classpath = scan.getClasspath();
-      java_exe = System.getProperty("java.home") + File.separator + "bin"
-              + File.separator + "java";
-
-    }
-    while (classpath == null)
-    {
-      try
-      {
-        Thread.sleep(10);
-      } catch (InterruptedException x)
-      {
-
-      }
-    }
-    return classpath;
-  }
-
   private Worker getJalviewDesktopRunner(String jvmArgs, String appArgs)
   {
-    String classpath = getClassPath();
+    String classpath = new String("/usr/share/java/jelview.jar");
     String cmd = java_exe + " " + " -classpath " + classpath + " " + jvmArgs
             + " jalview.bin.Jalview " + " "
             + "--props=test/jalview/bin/hidpiTestProps.jvprops " + appArgs;
--- a/test/jalview/util/Log4jTest.java
+++ b/test/jalview/util/Log4jTest.java
@@ -32,8 +32,6 @@
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-import io.github.classgraph.ClassGraph;
-import io.github.classgraph.ScanResult;
 import jalview.bin.Console;
 
 public class Log4jTest
@@ -90,39 +88,14 @@
     }
   }
 
-  private static ClassGraph scanner = null;
 
   private static String classpath = null;
 
   private static String java_exe = null;
 
-  public synchronized static String getClassPath()
-  {
-    if (scanner == null)
-    {
-      scanner = new ClassGraph();
-      ScanResult scan = scanner.scan();
-      classpath = scan.getClasspath();
-      java_exe = System.getProperty("java.home") + File.separator + "bin"
-              + File.separator + "java";
-
-    }
-    while (classpath == null)
-    {
-      try
-      {
-        Thread.sleep(10);
-      } catch (InterruptedException x)
-      {
-
-      }
-    }
-    return classpath;
-  }
-
   private Worker getJalviewDesktopRunner(String appArgs)
   {
-    String classpath = getClassPath();
+    String classpath = new String("/usr/share/java/jalview.jar");
     String cmd = java_exe + " " + " -classpath " + classpath + " "
             + " jalview.bin.Jalview " + " "
             + "--props=test/jalview/util/log4jTestProps.jvprops " + appArgs;