File: Remove-javax.media.jai-dependency.patch

package info (click to toggle)
starjava-datanode 1.0%2B2020.10.01-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,664 kB
  • sloc: java: 10,637; xml: 522; makefile: 15
file content (35 lines) | stat: -rw-r--r-- 1,373 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
From: Ole Streicher <olebole@debian.org>
Date: Mon, 9 Jan 2017 22:11:15 +0100
Subject: Remove javax.media.jai dependency

JAI is not free and cannot be used in a Debian package.
---
 src/main/uk/ac/starlink/datanode/nodes/NodeUtil.java | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/main/uk/ac/starlink/datanode/nodes/NodeUtil.java b/src/main/uk/ac/starlink/datanode/nodes/NodeUtil.java
index ba6a8a1..64a63d0 100644
--- a/src/main/uk/ac/starlink/datanode/nodes/NodeUtil.java
+++ b/src/main/uk/ac/starlink/datanode/nodes/NodeUtil.java
@@ -87,18 +87,10 @@ public class NodeUtil {
      */
     public static boolean hasJAI() {
         if ( hasJAI_ == null ) {
-            try {
-                /* Use this class because it's lightweight and won't cause a
-                 * whole cascade of other classes to be loaded. */
-                new javax.media.jai.util.CaselessStringKey( "dummy" );
-                hasJAI_ = Boolean.TRUE;
+	    hasJAI_ = Boolean.FALSE;
+	    logger.warning(
+			   "JAI extension not present - no image display" );
             }
-            catch ( NoClassDefFoundError e ) {
-                hasJAI_ = Boolean.FALSE;
-                logger.warning(
-                    "JAI extension not present - no image display" );
-            }
-        }
         return hasJAI_.booleanValue();
     }