From 6292beaede500c125091a84263ed7cda454ba299 Mon Sep 17 00:00:00 2001
From: Gaetan Boismal <gaetan.boismal@forgerock.com>
Date: Wed, 21 Oct 2015 16:05:43 +0000
Subject: [PATCH] OPENDJ-2348 PR-96 Remove webstart and netscape support
---
opendj-server-legacy/src/main/java/org/opends/quicksetup/LicenseFile.java | 54 +++++++-----------------------------------------------
1 files changed, 7 insertions(+), 47 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/quicksetup/LicenseFile.java b/opendj-server-legacy/src/main/java/org/opends/quicksetup/LicenseFile.java
index 3247350..27f28f4 100644
--- a/opendj-server-legacy/src/main/java/org/opends/quicksetup/LicenseFile.java
+++ b/opendj-server-legacy/src/main/java/org/opends/quicksetup/LicenseFile.java
@@ -34,7 +34,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.net.URL;
import org.opends.quicksetup.util.Utils;
import org.opends.server.util.ServerConstants;
@@ -124,17 +123,6 @@
}
/**
- * Returns the URL to the license file when using jnlp / java web start.
- */
- private static URL getWebStartLicenseFile()
- {
- final String licenseResource =
- LEGAL_FOLDER_NAME + File.separatorChar + LICENSE_FILE_NAME;
- return Thread.currentThread().getContextClassLoader().getResource(
- licenseResource);
- }
-
- /**
* Checks if the license file exists.
*
* @return <CODE>true</CODE> if the license file exists in the Legal directory
@@ -143,14 +131,7 @@
*/
public static boolean exists()
{
- if (Utils.isWebStart())
- {
- return getWebStartLicenseFile() != null;
- }
- else
- {
- return getFile().exists();
- }
+ return getFile().exists();
}
/**
@@ -161,37 +142,16 @@
public static String getText()
{
InputStream input = null;
- // Gets the inputstream of the license
- // From a file as the usual way,
- // from an URL if we use web start / jnlp.
- if (!Utils.isWebStart())
+ try
{
- try
- {
- input = new FileInputStream(getFile());
- }
- catch (FileNotFoundException e)
- {
- // Should not happen
- return "";
- }
+ input = new FileInputStream(getFile());
}
- else
+ catch (FileNotFoundException e)
{
- URL licenseURL = getWebStartLicenseFile();
- if (licenseURL != null)
- {
- try
- {
- input = licenseURL.openStream();
- }
- catch (Exception e)
- {
- // Should not happen
- return "";
- }
- }
+ // Should not happen
+ return "";
}
+
// Reads the inputstream content.
final StringBuilder sb = new StringBuilder();
if (input != null)
--
Gitblit v1.10.0