Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java')
-rw-r--r--bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java48
1 files changed, 27 insertions, 21 deletions
diff --git a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
index 01e6f58f1..76d84a6ca 100644
--- a/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
+++ b/bundles/org.eclipse.equinox.servletbridge/src/org/eclipse/equinox/servletbridge/FrameworkLauncher.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2018 Cognos Incorporated, IBM Corporation and others.
+ * Copyright (c) 2005, 2019 Cognos Incorporated, IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -7,7 +7,7 @@
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
- *
+ *
* Contributors:
* Cognos Incorporated - initial API and implementation
* IBM Corporation - bug fixes and enhancements
@@ -34,10 +34,10 @@ import javax.servlet.ServletContext;
* 4) stop
* 5) undeploy
* 6) destroy
- * an instance of the OSGi framework.
+ * an instance of the OSGi framework.
* These 6 methods are provided to help manage the life-cycle and are called from outside this
* class by the BridgeServlet. To create an extended FrameworkLauncher over-ride these methods to allow
- * custom behavior.
+ * custom behavior.
*/
public class FrameworkLauncher {
@@ -112,7 +112,7 @@ public class FrameworkLauncher {
};
static {
- // We do this to ensure the anonymous Enumeration class in allPermissions is pre-loaded
+ // We do this to ensure the anonymous Enumeration class in allPermissions is pre-loaded
if (allPermissions.elements() == null)
throw new IllegalStateException();
}
@@ -273,12 +273,18 @@ public class FrameworkLauncher {
// We know spec version 3.0 corresponds to package version 2.6
// we are guessing future 3.x spec versions will increment package versions minor, so ...
String servletVersion = (context.getMajorVersion() - 1) + "." + (context.getMinorVersion() + 6); //$NON-NLS-1$
+ String specVersion = context.getMajorVersion() + "." + context.getMinorVersion(); //$NON-NLS-1$
packageExports = "org.eclipse.equinox.servletbridge; version=1.1" + //$NON-NLS-1$
", javax.servlet; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet; version=" + specVersion + //$NON-NLS-1$
", javax.servlet.annotation; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.annotation; version=" + specVersion + //$NON-NLS-1$
", javax.servlet.descriptor; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.descriptor; version=" + specVersion + //$NON-NLS-1$
", javax.servlet.http; version=" + servletVersion + //$NON-NLS-1$
- ", javax.servlet.resources; version=" + servletVersion; //$NON-NLS-1$
+ ", javax.servlet.http; version=" + specVersion + //$NON-NLS-1$
+ ", javax.servlet.resources; version=" + servletVersion + //$NON-NLS-1$
+ ", javax.servlet.resources; version=" + specVersion; //$NON-NLS-1$
} else {
// We know spec version 2.x directly correspond to package versions
String servletVersion = context.getMajorVersion() + "." + context.getMinorVersion(); //$NON-NLS-1$
@@ -343,7 +349,7 @@ public class FrameworkLauncher {
}
/** undeploy is the reverse operation of deploy and removes the OSGi framework libraries from their
- * execution location. Typically this method will only be called if a manual undeploy is requested in the
+ * execution location. Typically this method will only be called if a manual undeploy is requested in the
* ServletBridge.
* By default, this method removes the OSGi install and also removes the workspace.
*/
@@ -370,7 +376,7 @@ public class FrameworkLauncher {
/** start is used to "start" a previously deployed OSGi framework
* The default behavior will read launcher.ini to create a set of initial properties and
* use the "commandline" configuration parameter to create the equivalent command line arguments
- * available when starting Eclipse.
+ * available when starting Eclipse.
*/
public synchronized void start() {
if (platformDirectory == null)
@@ -684,7 +690,7 @@ public class FrameworkLauncher {
}
/**
- * buildCommandLineArguments parses the commandline config parameter into a set of arguments
+ * buildCommandLineArguments parses the commandline config parameter into a set of arguments
* @return an array of String containing the commandline arguments
*/
protected String[] buildCommandLineArguments() {
@@ -696,9 +702,9 @@ public class FrameworkLauncher {
while (tokenizer.hasMoreTokens()) {
String arg = tokenizer.nextToken();
if (arg.startsWith("\"")) { //$NON-NLS-1$
- if (arg.endsWith("\"")) { //$NON-NLS-1$
+ if (arg.endsWith("\"")) { //$NON-NLS-1$
if (arg.length() >= 2) {
- // strip the beginning and ending quotes
+ // strip the beginning and ending quotes
arg = arg.substring(1, arg.length() - 1);
}
} else {
@@ -708,9 +714,9 @@ public class FrameworkLauncher {
tokenizer.nextToken(WS_DELIM);
}
} else if (arg.startsWith("'")) { //$NON-NLS-1$
- if (arg.endsWith("'")) { //$NON-NLS-1$
+ if (arg.endsWith("'")) { //$NON-NLS-1$
if (arg.length() >= 2) {
- // strip the beginning and ending quotes
+ // strip the beginning and ending quotes
arg = arg.substring(1, arg.length() - 1);
}
} else {
@@ -758,7 +764,7 @@ public class FrameworkLauncher {
Thread.currentThread().setContextClassLoader(frameworkContextClassLoader);
method.invoke(clazz);
- // ACL keys its loggers off of the ContextClassLoader which prevents GC without calling release.
+ // ACL keys its loggers off of the ContextClassLoader which prevents GC without calling release.
// This section explicitly calls release if ACL is used.
try {
clazz = this.getClass().getClassLoader().loadClass("org.apache.commons.logging.LogFactory"); //$NON-NLS-1$
@@ -901,10 +907,10 @@ public class FrameworkLauncher {
/**
* Searches for the given target directory starting in the "plugins" subdirectory
- * of the given location. If one is found then this location is returned;
+ * of the given location. If one is found then this location is returned;
* otherwise an exception is thrown.
- * @param target
- *
+ * @param target
+ *
* @return the location where target directory was found
* @param start the location to begin searching
*/
@@ -952,9 +958,9 @@ public class FrameworkLauncher {
}
/**
- * Compares version strings.
- * @param left
- * @param right
+ * Compares version strings.
+ * @param left
+ * @param right
* @return result of comparison, as integer;
* <code><0</code> if left < right;
* <code>0</code> if left == right;
@@ -981,7 +987,7 @@ public class FrameworkLauncher {
* Do a quick parse of version identifier so its elements can be correctly compared.
* If we are unable to parse the full version, remaining elements are initialized
* with suitable defaults.
- * @param version
+ * @param version
* @return an array of size 4; first three elements are of type Integer (representing
* major, minor and service) and the fourth element is of type String (representing
* qualifier). Note, that returning anything else will cause exceptions in the caller.

Back to the top