This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push:
new 51a89a3020 FELIX-6626 : Support jakarta servlet registration
51a89a3020 is described below
commit 51a89a3020271b9716bbdcb947f4802bd8b9ff3a
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Wed Aug 23 10:53:49 2023 +0200
FELIX-6626 : Support jakarta servlet registration
---
.../felix/webconsole/AbstractWebConsolePlugin.java | 60 ++++++++++----------
.../felix/webconsole/ConfigurationPrinter.java | 10 ++--
.../felix/webconsole/SimpleWebConsolePlugin.java | 2 +-
.../webconsole/WebConsoleSecurityProvider2.java | 2 +-
.../webconsole/bundleinfo/BundleInfoType.java | 12 ++--
.../org/apache/felix/webconsole/internal/Util.java | 6 +-
.../webconsole/internal/compendium/LogServlet.java | 60 ++++++++++----------
.../compendium/WireAdminConfigurationPrinter.java | 14 ++---
.../internal/configuration/ConfigAdminSupport.java | 4 +-
.../internal/configuration/ConfigJsonSupport.java | 46 +++++++--------
.../internal/configuration/ConfigManager.java | 66 +++++++++++-----------
.../internal/configuration/ConfigurationUtil.java | 2 +-
.../internal/configuration/MetaTypeSupport.java | 26 ++++-----
.../webconsole/internal/core/BundlesServlet.java | 10 ++--
.../core/CapabilitiesProvidedInfoProvider.java | 6 +-
.../core/CapabilitiesRequiredInfoProvider.java | 8 +--
.../core/PermissionsConfigurationPrinter.java | 14 ++---
.../webconsole/internal/core/ServicesServlet.java | 6 +-
.../internal/core/ServicesUsedInfoProvider.java | 8 +--
.../webconsole/internal/misc/ThreadDumper.java | 24 ++++----
.../servlet/ConfigurationMetatypeSupport.java | 28 ++++-----
.../internal/servlet/ConfigurationUtil.java | 2 +-
.../webconsole/internal/servlet/OsgiManager.java | 51 +++++++++--------
.../felix/webconsole/servlet/AbstractServlet.java | 2 +-
24 files changed, 237 insertions(+), 232 deletions(-)
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
b/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
index 9183a28804..6d5b91a3de 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/AbstractWebConsolePlugin.java
@@ -73,7 +73,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
* @deprecated Use the Servlet API for uploads
*/
@Deprecated
- public static final String ATTR_FILEUPLOAD =
"org.apache.felix.webconsole.fileupload"; //$NON-NLS-1$
+ public static final String ATTR_FILEUPLOAD =
"org.apache.felix.webconsole.fileupload";
/**
* The name of the request attribute containing a {@link java.io.File} -
upload repository path used by
@@ -92,7 +92,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
* @deprecated Use the Servlet API for uploads
*/
@Deprecated
- public static final String ATTR_FILEUPLOAD_REPO =
"org.apache.felix.webconsole.fileupload.repo"; //$NON-NLS-1$
+ public static final String ATTR_FILEUPLOAD_REPO =
"org.apache.felix.webconsole.fileupload.repo";
/**
* Web Console Plugin typically consists of servlet and resources such as
images,
@@ -104,7 +104,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
*
* @see #getResourceProvider()
*/
- public static final String GET_RESOURCE_METHOD_NAME = "getResource";
//$NON-NLS-1$
+ public static final String GET_RESOURCE_METHOD_NAME = "getResource";
/**
* The header fragment read from the templates/main_header.html file
@@ -207,9 +207,9 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
renderTopNavigation( request, pw );
// wrap content in a separate div
- pw.println( "<div id='content'>" ); //$NON-NLS-1$
+ pw.println( "<div id='content'>" );
renderContent( request, response );
- pw.println( "</div>" ); //$NON-NLS-1$
+ pw.println( "</div>" );
// close the main div, body, and html
endResponse( pw );
@@ -587,7 +587,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
long lastModified = connection.getLastModified();
if ( lastModified > 0 )
{
- long ifModifiedSince = request.getDateHeader(
"If-Modified-Since" ); //$NON-NLS-1$
+ long ifModifiedSince = request.getDateHeader(
"If-Modified-Since" );
if ( ifModifiedSince >= ( lastModified / 1000 * 1000 ) )
{
// Round down to the nearest second for a proper
compare
@@ -598,12 +598,12 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
}
// have to send, so set the last modified header now
- response.setDateHeader( "Last-Modified", lastModified );
//$NON-NLS-1$
+ response.setDateHeader( "Last-Modified", lastModified );
}
// describe the contents
response.setContentType( getServletContext().getMimeType( pi )
);
- response.setIntHeader( "Content-Length",
connection.getContentLength() ); //$NON-NLS-1$
+ response.setIntHeader( "Content-Length",
connection.getContentLength() );
// spool the actual contents
OutputStream out = response.getOutputStream();
@@ -676,7 +676,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
{
// assume pathInfo to not be null, else this would not be called
String current = request.getPathInfo();
- int slash = current.indexOf( "/", 1 ); //$NON-NLS-1$
+ int slash = current.indexOf( "/", 1 );
if ( slash < 0 )
{
slash = current.length();
@@ -704,14 +704,14 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
}
if (!langMap.containsKey(locale))
{
- locale = "en"; //$NON-NLS-1$
+ locale = "en";
}
- pw.println("<div id='langSelect'>"); //$NON-NLS-1$
- pw.println(" <span>"); //$NON-NLS-1$
+ pw.println("<div id='langSelect'>");
+ pw.println(" <span>");
printLocaleElement(pw, appRoot, locale, langMap.get(locale));
- pw.println(" </span>"); //$NON-NLS-1$
- pw.println(" <span class='flags ui-helper-hidden'>"); //$NON-NLS-1$
+ pw.println(" </span>");
+ pw.println(" <span class='flags ui-helper-hidden'>");
for (Iterator li = langMap.keySet().iterator(); li.hasNext();)
{
// <img src="us.gif" alt="en" title="English"/>
@@ -722,8 +722,8 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
}
}
- pw.println(" </span>"); //$NON-NLS-1$
- pw.println("</div>"); //$NON-NLS-1$
+ pw.println(" </span>");
+ pw.println("</div>");
}
}
@@ -775,15 +775,15 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
private static final void printLocaleElement( PrintWriter pw, String
appRoot, Object langCode, Object langName )
{
- pw.print(" <img src='"); //$NON-NLS-1$
+ pw.print(" <img src='");
pw.print(appRoot);
- pw.print("/res/flags/"); //$NON-NLS-1$
+ pw.print("/res/flags/");
pw.print(langCode);
- pw.print(".gif' alt='"); //$NON-NLS-1$
+ pw.print(".gif' alt='");
pw.print(langCode);
- pw.print("' title='"); //$NON-NLS-1$
+ pw.print("' title='");
pw.print(langName);
- pw.println("'/>"); //$NON-NLS-1$
+ pw.println("'/>");
}
/**
@@ -900,7 +900,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
// (for example plugin provided CSS links)
if ( HEADER == null )
{
- HEADER = readTemplateFile( AbstractWebConsolePlugin.class,
"/templates/main_header.html" ); //$NON-NLS-1$
+ HEADER = readTemplateFile( AbstractWebConsolePlugin.class,
"/templates/main_header.html" );
}
return HEADER;
}
@@ -910,7 +910,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
{
if ( FOOTER == null )
{
- FOOTER = readTemplateFile( AbstractWebConsolePlugin.class,
"/templates/main_footer.html" ); //$NON-NLS-1$
+ FOOTER = readTemplateFile( AbstractWebConsolePlugin.class,
"/templates/main_footer.html" );
}
return FOOTER;
}
@@ -962,12 +962,12 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
catch ( IOException e )
{
// don't use new Exception(message, cause) because cause is 1.4+
- throw new RuntimeException( "readTemplateFile: Error loading " +
templateFile + ": " + e ); //$NON-NLS-1$ //$NON-NLS-2$
+ throw new RuntimeException( "readTemplateFile: Error loading " +
templateFile + ": " + e );
}
// template file does not exist, return an empty string
- log( LogService.LOG_ERROR, "readTemplateFile: File '" + templateFile +
"' not found through class " + clazz ); //$NON-NLS-1$ //$NON-NLS-2$
- return ""; //$NON-NLS-1$
+ log( LogService.LOG_ERROR, "readTemplateFile: File '" + templateFile +
"' not found through class " + clazz );
+ return "";
}
@@ -977,16 +977,16 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
final String[] cssRefs = getCssReferences();
if ( cssRefs == null )
{
- return ""; //$NON-NLS-1$
+ return "";
}
// build the CSS links from the references
final StringBuilder buf = new StringBuilder();
for ( int i = 0; i < cssRefs.length; i++ )
{
- buf.append( "<link href='" ); //$NON-NLS-1$
+ buf.append( "<link href='" );
buf.append( toUrl( cssRefs[i], appRoot ) );
- buf.append( "' rel='stylesheet' type='text/css' />" );
//$NON-NLS-1$
+ buf.append( "' rel='stylesheet' type='text/css' />" );
}
return buf.toString();
@@ -1007,7 +1007,7 @@ public abstract class AbstractWebConsolePlugin extends
HttpServlet {
*/
private static final String toUrl( final String url, final String appRoot )
{
- if ( url.startsWith( "/" ) ) //$NON-NLS-1$
+ if ( url.startsWith( "/" ) )
{
return appRoot + url;
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
b/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
index 18e33bc17c..13602b2d37 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
@@ -50,7 +50,7 @@ public interface ConfigurationPrinter {
*
* @since 3.0
*/
- String MODE_ALWAYS = "always"; //$NON-NLS-1$
+ String MODE_ALWAYS = "always";
/**
* The web mode - this printer is used in the web console.
@@ -61,21 +61,21 @@ public interface ConfigurationPrinter {
*
* @since 3.0
*/
- String MODE_WEB = "web"; //$NON-NLS-1$
+ String MODE_WEB = "web";
/**
* The zip mode - this printer is used in the zip.
*
* @since 3.0
*/
- String MODE_ZIP = "zip"; //$NON-NLS-1$
+ String MODE_ZIP = "zip";
/**
* The txt mode - this printer is used in the txt.
*
* @since 3.0
*/
- String MODE_TXT = "txt"; //$NON-NLS-1$
+ String MODE_TXT = "txt";
/**
* The optional service property specifying the modes of the printer.
@@ -87,7 +87,7 @@ public interface ConfigurationPrinter {
* @since 3.0
* @deprecated Use {@link WebConsoleConstants#CONFIG_PRINTER_MODES}
*/
- String PROPERTY_MODES = "modes"; //$NON-NLS-1$
+ String PROPERTY_MODES = "modes";
/**
* Returns a human readable title string to be placed in front of the
configuration
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
b/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
index 178bb662e8..b0abba0e1d 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/SimpleWebConsolePlugin.java
@@ -231,7 +231,7 @@ public abstract class SimpleWebConsolePlugin extends
AbstractWebConsolePlugin
if ( getCategory() != null ) {
props.put( WebConsoleConstants.PLUGIN_CATEGORY, getCategory()
);
}
- reg = bc.registerService( Servlet.class, this, props );
//$NON-NLS-1$
+ reg = bc.registerService( Servlet.class, this, props );
}
return this;
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleSecurityProvider2.java
b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleSecurityProvider2.java
index 62b2d533ca..8a91e2c4b1 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleSecurityProvider2.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleSecurityProvider2.java
@@ -46,7 +46,7 @@ public interface WebConsoleSecurityProvider2 extends
WebConsoleSecurityProvider
* {@link WebConsoleSecurityProvider#authorize(Object, String)} to
* authorize access for certain roles.
*/
- String USER_ATTRIBUTE = "org.apache.felix.webconsole.user"; //$NON-NLS-1$
+ String USER_ATTRIBUTE = "org.apache.felix.webconsole.user";
/**
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
b/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
index 033564bc88..c033eda496 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/bundleinfo/BundleInfoType.java
@@ -38,20 +38,20 @@ public final class BundleInfoType
* for security reasons, the protocol cannot be <code>file</code> for
* external links.
*/
- public static final BundleInfoType LINK = new BundleInfoType( "link" );
//$NON-NLS-1$
+ public static final BundleInfoType LINK = new BundleInfoType( "link" );
/**
* This information type, specifies that the value of the information is
URL
* object, that points to a resource. In that case the UI could consider
* that as a <em>download</em> link.
*/
- public static final BundleInfoType RESOURCE = new BundleInfoType(
"resource" ); //$NON-NLS-1$
+ public static final BundleInfoType RESOURCE = new BundleInfoType(
"resource" );
/**
* That information type is for normal information keys, that provide a
* normal (not link) value as information. The type of the value is
* <code>Object</code> and UI will visualize it by using it's
* {@link Object#toString()} method.
*/
- public static final BundleInfoType VALUE = new BundleInfoType( "value" );
//$NON-NLS-1$
+ public static final BundleInfoType VALUE = new BundleInfoType( "value" );
private final String name;
@@ -88,17 +88,17 @@ public final class BundleInfoType
if ( !( value instanceof String ) )
throw new IllegalArgumentException( "Not a String" );
final String val = ( String ) value;
- final int idx = val.indexOf( "://" ); //$NON-NLS-1$
+ final int idx = val.indexOf( "://" );
// check local
if ( idx == -1 )
{
- if ( !val.startsWith( "/" ) ) //$NON-NLS-1$
+ if ( !val.startsWith( "/" ) )
throw new IllegalArgumentException( "Invalid local link: "
+ val );
}
else
{
// check external link
- if ( val.substring( 0, idx ).equalsIgnoreCase( "file" ) )
//$NON-NLS-1$
+ if ( val.substring( 0, idx ).equalsIgnoreCase( "file" ) )
throw new IllegalArgumentException( "External link cannot
use file protocol: " + value );
}
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
index 51e8874b41..0a57c4d895 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/Util.java
@@ -197,9 +197,9 @@ public class Util {
public static void sendJsonOk(final HttpServletResponse response) throws
IOException
{
- response.setContentType( "application/json" ); //$NON-NLS-1$
- response.setCharacterEncoding( "UTF-8" ); //$NON-NLS-1$
- response.getWriter().print( "{ \"status\": true }" ); //$NON-NLS-1$
+ response.setContentType( "application/json" );
+ response.setCharacterEncoding( "UTF-8" );
+ response.getWriter().print( "{ \"status\": true }" );
}
public static final Locale getLocale( final HttpServletRequest request ) {
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java
index 60204145a0..e53748f8cf 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/LogServlet.java
@@ -44,9 +44,9 @@ import org.osgi.service.log.LogService;
*/
public class LogServlet extends SimpleWebConsolePlugin implements
OsgiManagerPlugin
{
- private static final String LABEL = "logs"; //$NON-NLS-1$
- private static final String TITLE = "%logs.pluginTitle"; //$NON-NLS-1$
- private static final String CSS[] = { "/res/ui/logs.css" }; //$NON-NLS-1$
+ private static final String LABEL = "logs";
+ private static final String TITLE = "%logs.pluginTitle";
+ private static final String CSS[] = { "/res/ui/logs.css" };
private final static int MAX_LOGS = 200; //maximum number of log entries
@@ -59,7 +59,7 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
super(LABEL, TITLE, CATEGORY_OSGI, CSS);
// load templates
- TEMPLATE = readTemplateFile( "/templates/logs.html" ); //$NON-NLS-1$
+ TEMPLATE = readTemplateFile( "/templates/logs.html" );
}
@@ -68,17 +68,17 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
*/
protected void doPost( HttpServletRequest req, HttpServletResponse resp )
throws IOException
{
- final int minLevel = WebConsoleUtil.getParameterInt( req, "minLevel",
LogService.LOG_DEBUG); //$NON-NLS-1$
+ final int minLevel = WebConsoleUtil.getParameterInt( req, "minLevel",
LogService.LOG_DEBUG);
- resp.setContentType( "application/json" ); //$NON-NLS-1$
- resp.setCharacterEncoding( "utf-8" ); //$NON-NLS-1$
+ resp.setContentType( "application/json" );
+ resp.setCharacterEncoding( "utf-8" );
renderJSON( resp.getWriter(), minLevel, trasesEnabled(req) );
}
private static boolean trasesEnabled( final HttpServletRequest req )
{
- String traces = req.getParameter("traces"); //$NON-NLS-1$
+ String traces = req.getParameter("traces");
return null == traces ? false : Boolean.valueOf( traces
).booleanValue();
}
@@ -92,10 +92,10 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
JSONWriter jw = new JSONWriter( pw );
jw.object();
- jw.key( "status" ); //$NON-NLS-1$
+ jw.key( "status" );
jw.value( logReaderService == null ? Boolean.FALSE : Boolean.TRUE );
- jw.key( "data" ); //$NON-NLS-1$
+ jw.key( "data" );
jw.array();
if ( logReaderService != null )
@@ -125,12 +125,12 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
protected void doGet( HttpServletRequest request, HttpServletResponse
response ) throws ServletException,
IOException
{
- final int minLevel = WebConsoleUtil.getParameterInt( request,
"minLevel", LogService.LOG_DEBUG ); //$NON-NLS-1$
+ final int minLevel = WebConsoleUtil.getParameterInt( request,
"minLevel", LogService.LOG_DEBUG );
final String info = request.getPathInfo();
- if ( info.endsWith( ".json" ) ) //$NON-NLS-1$
+ if ( info.endsWith( ".json" ) )
{
- response.setContentType( "application/json" ); //$NON-NLS-1$
- response.setCharacterEncoding( "UTF-8" ); //$NON-NLS-1$
+ response.setContentType( "application/json" );
+ response.setCharacterEncoding( "UTF-8" );
PrintWriter pw = response.getWriter();
this.renderJSON( pw, minLevel, trasesEnabled(request) );
@@ -152,24 +152,24 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
private static final void logJson( JSONWriter jw, LogEntry info, int
index, boolean traces ) throws IOException
{
jw.object();
- jw.key( "id" ); //$NON-NLS-1$
+ jw.key( "id" );
jw.value( String.valueOf( index ) );
- jw.key( "received" ); //$NON-NLS-1$
+ jw.key( "received" );
jw.value( info.getTime() );
- jw.key( "level" ); //$NON-NLS-1$
+ jw.key( "level" );
jw.value( logLevel( info.getLevel() ) );
- jw.key( "raw_level" ); //$NON-NLS-1$
+ jw.key( "raw_level" );
jw.value( info.getLevel() );
- jw.key( "message" ); //$NON-NLS-1$
+ jw.key( "message" );
jw.value( info.getMessage() );
- jw.key( "service" ); //$NON-NLS-1$
+ jw.key( "service" );
jw.value( serviceDescription( info.getServiceReference() ) );
- jw.key( "exception" ); //$NON-NLS-1$
+ jw.key( "exception" );
jw.value( exceptionMessage( info.getException(), traces ) );
Bundle bundle = info.getBundle();
if (null != bundle)
{
- jw.key("bundleId"); //$NON-NLS-1$
+ jw.key("bundleId");
jw.value(bundle.getBundleId());
String name = (String)
bundle.getHeaders().get(Constants.BUNDLE_NAME);
if (null == name)
@@ -180,7 +180,7 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
{
name = bundle.getLocation();
}
- jw.key("bundleName"); //$NON-NLS-1$
+ jw.key("bundleName");
jw.value(name);
}
jw.endObject();
@@ -191,7 +191,7 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
{
if ( serviceReference == null )
{
- return ""; //$NON-NLS-1$
+ return "";
}
return serviceReference.toString();
}
@@ -202,14 +202,14 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
switch ( level )
{
case LogService.LOG_INFO:
- return "INFO"; //$NON-NLS-1$
+ return "INFO";
case LogService.LOG_WARNING:
- return "WARNING"; //$NON-NLS-1$
+ return "WARNING";
case LogService.LOG_ERROR:
- return "ERROR"; //$NON-NLS-1$
+ return "ERROR";
case LogService.LOG_DEBUG:
default:
- return "DEBUG"; //$NON-NLS-1$
+ return "DEBUG";
}
}
@@ -220,7 +220,7 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
{
if ( e == null )
{
- return ""; //$NON-NLS-1$
+ return "";
}
if (traces) {
String ret = null;
@@ -235,7 +235,7 @@ public class LogServlet extends SimpleWebConsolePlugin
implements OsgiManagerPlu
}
return ret;
}
- return e.getClass().getName() + ": " + e.getMessage(); //$NON-NLS-1$
+ return e.getClass().getName() + ": " + e.getMessage();
}
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java
index 512ee4c446..40e3a2bbc7 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/WireAdminConfigurationPrinter.java
@@ -39,7 +39,7 @@ public final class WireAdminConfigurationPrinter extends
AbstractConfigurationPr
private static final String TITLE = "Wire Admin";
- private static final String WIRE_ADMIN_NAME =
"org.osgi.service.wireadmin.WireAdmin"; //$NON-NLS-1$
+ private static final String WIRE_ADMIN_NAME =
"org.osgi.service.wireadmin.WireAdmin";
/**
@@ -104,7 +104,7 @@ public final class WireAdminConfigurationPrinter extends
AbstractConfigurationPr
// print wires
for (int i = 0; i < len; i++)
{
- pw.print("#"); //$NON-NLS-1$
+ pw.print("#");
pw.print(i);
print(wires[i], pw);
}
@@ -151,9 +151,9 @@ public final class WireAdminConfigurationPrinter extends
AbstractConfigurationPr
{
pw.print(" Value: ");
pw.print(val);
- pw.print(" ("); //$NON-NLS-1$
+ pw.print(" (");
pw.print(val.getClass().getName());
- pw.println(")"); //$NON-NLS-1$
+ pw.println(")");
}
String[] scope = wire.getScope();
@@ -166,7 +166,7 @@ public final class WireAdminConfigurationPrinter extends
AbstractConfigurationPr
pw.println(" Scope: ");
for (int i = 0, len = scope.length; i < len; i++)
{
- pw.print(" "); //$NON-NLS-1$
+ pw.print(" ");
pw.println(scope[i]);
}
}
@@ -183,7 +183,7 @@ public final class WireAdminConfigurationPrinter extends
AbstractConfigurationPr
{
pw.print(flavors[i].getName());
if (i < len - 1)
- pw.print(", "); //$NON-NLS-1$
+ pw.print(", ");
}
pw.println();
}
@@ -199,7 +199,7 @@ public final class WireAdminConfigurationPrinter extends
AbstractConfigurationPr
for (Enumeration<String> e = props.keys(); e.hasMoreElements();)
{
final String key = e.nextElement();
- pw.print(" "); //$NON-NLS-1$
+ pw.print(" ");
pw.print(key);
pw.print('=');
pw.println(props.get(key));
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
index 22808db8c2..76195ee023 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
@@ -133,7 +133,7 @@ class ConfigAdminSupport {
final List<String> propsToKeep = new ArrayList<>();
for(final String propName : propertyList)
{
- final String paramName = "action".equals(propName) //$NON-NLS-1$
+ final String paramName = "action".equals(propName)
|| ConfigManager.ACTION_DELETE.equals(propName)
|| ConfigManager.ACTION_APPLY.equals(propName)
|| ConfigManager.PROPERTY_LIST.equals(propName)
@@ -290,7 +290,7 @@ class ConfigAdminSupport {
// dynamic bundle location and then try to set both to null
if ( config.getBundleLocation() != null )
{
- config.setBundleLocation( "??invalid:bundle/location" );
//$NON-NLS-1$
+ config.setBundleLocation( "??invalid:bundle/location" );
config.setBundleLocation( null );
}
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigJsonSupport.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigJsonSupport.java
index e066387dd2..3e64f5c521 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigJsonSupport.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigJsonSupport.java
@@ -166,10 +166,10 @@ class ConfigJsonSupport {
final ObjectClassDefinition ocd =
this.getObjectClassDefinition(config, pid, locale);
if ( ocd != null ) {
- json.key( "title" ).value( ocd.getName() ); //$NON-NLS-1$
+ json.key( "title" ).value( ocd.getName() );
if ( ocd.getDescription() != null ) {
- json.key( "description" ).value( ocd.getDescription() );
//$NON-NLS-1$
+ json.key( "description" ).value( ocd.getDescription() );
}
final AttributeDefinition[] optionalArray =
ocd.getAttributeDefinitions( ObjectClassDefinition.OPTIONAL );
@@ -177,7 +177,7 @@ class ConfigJsonSupport {
final List<AttributeDefinition> attributes =
filterAttributeDefinitions(config != null ? config.getFactoryPid() : null, pid,
ocd.getAttributeDefinitions( ObjectClassDefinition.ALL ));
final Set<String> metatypeAttributes = new HashSet<>(
ConfigAdminSupport.CONFIG_PROPERTIES_HIDE );
- json.key( "properties" ).object(); //$NON-NLS-1$
+ json.key( "properties" ).object();
for(final AttributeDefinition adi : attributes) {
final String attrId = adi.getID();
if (!
ConfigAdminSupport.CONFIG_PROPERTIES_HIDE.contains(attrId)) {
@@ -204,13 +204,13 @@ class ConfigJsonSupport {
}
} else {
- json.key( "title" ).value( pid ); //$NON-NLS-1$
- json.key( "description" ).value( //$NON-NLS-1$
+ json.key( "title" ).value( pid );
+ json.key( "description" ).value(
"This form is automatically generated from existing
properties because no property "
+ "descriptors are available for this configuration. This
may be caused by the absence "
+ "of the OSGi Metatype Service or the absence of a
MetaType descriptor for this configuration." );
- json.key( "properties" ).object(); //$NON-NLS-1$
+ json.key( "properties" ).object();
if ( props != null ) {
for ( Enumeration<String> pe = props.keys();
pe.hasMoreElements(); ) {
final String id = pe.nextElement();
@@ -250,7 +250,7 @@ class ConfigJsonSupport {
}
String location;
if ( bundleLocation == null ) {
- location = ""; //$NON-NLS-1$
+ location = "";
} else {
// if the configuration is bound to a bundle location which
// is not related to an installed bundle, we just print the
@@ -264,32 +264,32 @@ class ConfigJsonSupport {
if ( name == null ) {
location = bundle.getSymbolicName();
} else {
- location = name + " (" + bundle.getSymbolicName() + ')';
//$NON-NLS-1$
+ location = name + " (" + bundle.getSymbolicName() + ')';
}
Version v = Version.parseVersion( headers.get(
Constants.BUNDLE_VERSION ) );
location += ", Version " + v.toString();
}
}
- json.key( "bundleLocation" ); //$NON-NLS-1$
+ json.key( "bundleLocation" );
json.value( location );
// raw bundle location and service locations
final String pid = config.getPid();
- String serviceLocation = ""; //$NON-NLS-1$
+ String serviceLocation = "";
try {
final ServiceReference<?>[] refs =
this.servletSupport.getBundleContext().getServiceReferences(
(String)null,
- "(&(" + Constants.OBJECTCLASS + '=' +
ManagedService.class.getName() //$NON-NLS-1$
- + ")(" + Constants.SERVICE_PID + '=' + pid + "))");
//$NON-NLS-1$ //$NON-NLS-2$
+ "(&(" + Constants.OBJECTCLASS + '=' +
ManagedService.class.getName()
+ + ")(" + Constants.SERVICE_PID + '=' + pid + "))");
if ( refs != null && refs.length > 0 ) {
serviceLocation = refs[0].getBundle().getLocation();
}
} catch (final Throwable t) {
this.servletSupport.log( "Error getting service associated with
configuration " + pid, t );
}
- json.key( "bundle_location" ); //$NON-NLS-1$
+ json.key( "bundle_location" );
json.value ( bundleLocation );
- json.key( "service_location" ); //$NON-NLS-1$
+ json.key( "service_location" );
json.value ( serviceLocation );
}
@@ -364,25 +364,25 @@ class ConfigJsonSupport {
if ( include ) {
hasConfigurations = true;
jw.object();
- jw.key("id").value( entry.getKey() ); //$NON-NLS-1$
- jw.key( "name").value( entry.getValue() ); //$NON-NLS-1$
+ jw.key("id").value( entry.getKey() );
+ jw.key( "name").value( entry.getValue() );
if ( null != config ) {
// FELIX-3848
- jw.key("has_config").value( true ); //$NON-NLS-1$
+ jw.key("has_config").value( true );
if ( config.getFactoryPid() != null ) {
- jw.key("fpid").value( config.getFactoryPid() );
//$NON-NLS-1$
+ jw.key("fpid").value( config.getFactoryPid() );
final String val =
getConfigurationFactoryNameHint(config);
if ( val != null ) {
- jw.key( "nameHint").value(val ); //$NON-NLS-1$
+ jw.key( "nameHint").value(val );
}
}
final Bundle bundle = getBoundBundle( config );
if ( null != bundle ) {
- jw.key( "bundle").value( bundle.getBundleId() );
//$NON-NLS-1$
- jw.key( "bundle_name").value( Util.getName(
bundle, loc ) ); //$NON-NLS-1$
+ jw.key( "bundle").value( bundle.getBundleId() );
+ jw.key( "bundle_name").value( Util.getName(
bundle, loc ) );
}
}
jw.endObject();
@@ -515,8 +515,8 @@ class ConfigJsonSupport {
}
if ( include ) {
jw.object();
- jw.key("id").value( entry.getKey() ); //$NON-NLS-1$
- jw.key("name").value( entry.getValue() ); //$NON-NLS-1$
+ jw.key("id").value( entry.getKey() );
+ jw.key("name").value( entry.getValue() );
jw.endObject();
}
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
index 5233dc621a..56d9815e2f 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigManager.java
@@ -56,28 +56,28 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
private static final long serialVersionUID = 5021174538498622428L;
- private static final String LABEL = "configMgr"; // was name //$NON-NLS-1$
- private static final String TITLE = "%configMgr.pluginTitle"; //$NON-NLS-1$
- private static final String CSS[] = { "/res/ui/config.css" }; //$NON-NLS-1$
+ private static final String LABEL = "configMgr"; // was name
+ private static final String TITLE = "%configMgr.pluginTitle";
+ private static final String CSS[] = { "/res/ui/config.css" };
- static final String PID_FILTER = "pidFilter"; //$NON-NLS-1$
- static final String PID = "pid"; //$NON-NLS-1$
- static final String FACTORY_PID = "factoryPid"; //$NON-NLS-1$
- static final String REFERER = "referer"; //$NON-NLS-1$
- static final String FACTORY_CREATE = "factoryCreate"; //$NON-NLS-1$
+ static final String PID_FILTER = "pidFilter";
+ static final String PID = "pid";
+ static final String FACTORY_PID = "factoryPid";
+ static final String REFERER = "referer";
+ static final String FACTORY_CREATE = "factoryCreate";
- static final String ACTION_CREATE = "create"; //$NON-NLS-1$
- static final String ACTION_DELETE = "delete"; //$NON-NLS-1$
- static final String ACTION_APPLY = "apply"; //$NON-NLS-1$
- static final String ACTION_UPDATE = "update"; //$NON-NLS-1$
- static final String ACTION_UNBIND = "unbind"; //$NON-NLS-1$
- static final String PROPERTY_LIST = "propertylist"; //$NON-NLS-1$
- static final String LOCATION = "$location"; //$NON-NLS-1$
+ static final String ACTION_CREATE = "create";
+ static final String ACTION_DELETE = "delete";
+ static final String ACTION_APPLY = "apply";
+ static final String ACTION_UPDATE = "update";
+ static final String ACTION_UNBIND = "unbind";
+ static final String PROPERTY_LIST = "propertylist";
+ static final String LOCATION = "$location";
- static final String CONFIGURATION_ADMIN_NAME =
"org.osgi.service.cm.ConfigurationAdmin"; //$NON-NLS-1$
- static final String META_TYPE_NAME =
"org.osgi.service.metatype.MetaTypeService"; //$NON-NLS-1$
+ static final String CONFIGURATION_ADMIN_NAME =
"org.osgi.service.cm.ConfigurationAdmin";
+ static final String META_TYPE_NAME =
"org.osgi.service.metatype.MetaTypeService";
- public static final String UNBOUND_LOCATION = "??unbound:bundle/location";
//$NON-NLS-1$
+ public static final String UNBOUND_LOCATION = "??unbound:bundle/location";
// templates
private final String TEMPLATE;
@@ -90,7 +90,7 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
super(LABEL, TITLE, CATEGORY_OSGI, CSS);
// load templates
- TEMPLATE = readTemplateFile( "/templates/config.html" ); //$NON-NLS-1$
+ TEMPLATE = readTemplateFile( "/templates/config.html" );
}
@Override
@@ -161,7 +161,7 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
}
if ( request.getParameter( ACTION_APPLY ) != null ) {
- if ( request.getParameter( ConfigManager.ACTION_DELETE ) != null )
{ //$NON-NLS-1$
+ if ( request.getParameter( ConfigManager.ACTION_DELETE ) != null )
{
try {
cas.deleteConfiguration( pid );
Util.sendJsonOk(response);
@@ -171,7 +171,7 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
}
else
{
- final String propertyList = request.getParameter(
ConfigManager.PROPERTY_LIST ); //$NON-NLS-1$
+ final String propertyList = request.getParameter(
ConfigManager.PROPERTY_LIST );
if ( propertyList == null ) {
response.sendError(400);
return;
@@ -215,8 +215,8 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
}
// send the result
- response.setContentType( "application/json" ); //$NON-NLS-1$
- response.setCharacterEncoding( "UTF-8" ); //$NON-NLS-1$
+ response.setContentType( "application/json" );
+ response.setCharacterEncoding( "UTF-8" );
final Locale loc = Util.getLocale( request );
final String locale = ( loc != null ) ? loc.toString() : null;
cas.getJsonSupport().printConfigurationJson( response.getWriter(),
pid, config, pidFilter, locale );
@@ -230,16 +230,16 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
protected void doGet( HttpServletRequest request, HttpServletResponse
response )
throws ServletException, IOException {
// check for "post" requests from previous versions
- if ( "true".equals(request.getParameter("post")) ) { //$NON-NLS-1$
//$NON-NLS-2$
+ if ( "true".equals(request.getParameter("post")) ) {
this.doPost(request, response);
return;
}
final String info = request.getPathInfo();
// let's check for a JSON request
- if ( info.endsWith( ".json" ) ) //$NON-NLS-1$
+ if ( info.endsWith( ".json" ) )
{
- response.setContentType( "application/json" ); //$NON-NLS-1$
- response.setCharacterEncoding( "UTF-8" ); //$NON-NLS-1$
+ response.setContentType( "application/json" );
+ response.setCharacterEncoding( "UTF-8" );
// after last slash and without extension
String pid = info.substring( info.lastIndexOf( '/' ) + 1,
info.length() - 5 );
@@ -283,7 +283,7 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
final String locale = ( loc != null ) ? loc.toString() : null;
final PrintWriter pw = response.getWriter();
- pw.write( "[" ); //$NON-NLS-1$
+ pw.write( "[" );
final ConfigAdminSupport ca = this.getConfigurationAdminSupport();
if ( ca != null )
{
@@ -291,7 +291,7 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
final StringBuilder sb = new StringBuilder();
if ( pid != null && pidFilter != null)
{
- sb.append("(&"); //$NON-NLS-1$
+ sb.append("(&");
}
if ( pid != null )
{
@@ -341,7 +341,7 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
// should print message
}
}
- pw.write( "]" ); //$NON-NLS-1$
+ pw.write( "]" );
// nothing more to do
return;
@@ -413,10 +413,10 @@ public class ConfigManager extends SimpleWebConsolePlugin
implements OsgiManager
// check for osgi installer plugin
@SuppressWarnings({"unchecked", "deprecation" })
final Map<String, Object> labelMap = (Map<String, Object>)
request.getAttribute(WebConsoleConstants.ATTR_LABEL_MAP);
- jw.key("jsonsupport").value(
labelMap.containsKey("osgi-installer-config-printer") ); //$NON-NLS-1$
+ jw.key("jsonsupport").value(
labelMap.containsKey("osgi-installer-config-printer") );
final boolean hasMetatype = cas.getMetaTypeSupport() != null;
- jw.key("status").value( cas != null ? Boolean.TRUE : Boolean.FALSE);
//$NON-NLS-1$
- jw.key("metatype").value( hasMetatype ? Boolean.TRUE : Boolean.FALSE);
//$NON-NLS-1$
+ jw.key("status").value( cas != null ? Boolean.TRUE : Boolean.FALSE);
+ jw.key("metatype").value( hasMetatype ? Boolean.TRUE : Boolean.FALSE);
boolean hasConfigs = true;
if ( cas != null )
{
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigurationUtil.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigurationUtil.java
index 3df506a765..0197ef31b0 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigurationUtil.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigurationUtil.java
@@ -36,7 +36,7 @@ import org.osgi.service.cm.ConfigurationAdmin;
public class ConfigurationUtil {
- private static final String PLACEHOLDER_PID = "[Temporary PID replaced by
real PID upon save]"; //$NON-NLS-1$
+ private static final String PLACEHOLDER_PID = "[Temporary PID replaced by
real PID upon save]";
public static Configuration findConfiguration( final ConfigurationAdmin
service, final String pid ) {
if ( pid != null ) {
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/MetaTypeSupport.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/MetaTypeSupport.java
index 51c4c728d0..9f04760648 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/MetaTypeSupport.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/MetaTypeSupport.java
@@ -44,7 +44,7 @@ class MetaTypeSupport
* Marker value of password fields used as dummy values and
* indicating unmodified values.
*/
- static final String PASSWORD_PLACEHOLDER_VALUE = "unmodified";
//$NON-NLS-1$
+ static final String PASSWORD_PLACEHOLDER_VALUE = "unmodified";
static Bundle getBundle( final BundleContext bundleContext, final String
bundleLocation ) {
if ( bundleLocation == null ) {
@@ -78,18 +78,18 @@ class MetaTypeSupport
}
else if ( ad.getCardinality() == 0 )
{
- value = ""; //$NON-NLS-1$
+ value = "";
}
else
{
value = new String[0];
}
- json.key( "name" ); //$NON-NLS-1$
+ json.key( "name" );
json.value( ad.getName() );
- json.key( "optional" ); //$NON-NLS-1$
+ json.key( "optional" );
json.value( ad.isOptional() );
- json.key( "is_set" ); //$NON-NLS-1$
+ json.key( "is_set" );
json.value( propValue != null );
// attribute type - overwrite metatype provided type
@@ -97,13 +97,13 @@ class MetaTypeSupport
// type is string
int propertyType = getAttributeType( ad );
- json.key( "type" ); //$NON-NLS-1$
+ json.key( "type" );
if ( ad.getOptionLabels() != null && ad.getOptionLabels().length > 0 )
{
json.object();
- json.key( "labels" ); //$NON-NLS-1$
+ json.key( "labels" );
json.value( Arrays.asList( ad.getOptionLabels() ) );
- json.key( "values" ); //$NON-NLS-1$
+ json.key( "values" );
json.value( Arrays.asList( ad.getOptionValues() ) );
json.endObject();
}
@@ -129,12 +129,12 @@ class MetaTypeSupport
{
value = Array.get( value, 0 );
}
- json.key( "value" ); //$NON-NLS-1$
+ json.key( "value" );
json.value( value );
}
else
{
- json.key( "values" ); //$NON-NLS-1$
+ json.key( "values" );
json.array();
final List list = toList( value );
final Iterator iter = list.iterator();
@@ -155,8 +155,8 @@ class MetaTypeSupport
if ( ad.getDescription() != null )
{
- json.key( "description" ); //$NON-NLS-1$
- json.value( ad.getDescription() + " (" + ad.getID() + ")" );
//$NON-NLS-1$ //$NON-NLS-2$
+ json.key( "description" );
+ json.value( ad.getDescription() + " (" + ad.getID() + ")" );
}
json.endObject();
@@ -274,7 +274,7 @@ class MetaTypeSupport
{
return false;
}
- return name.toLowerCase().indexOf( "password" ) != -1; //$NON-NLS-1$
+ return name.toLowerCase().indexOf( "password" ) != -1;
}
static int getAttributeType( final PropertyDescriptor ad )
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
index 18c2ef1354..eb435cf10d 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -429,14 +429,14 @@ public class BundlesServlet extends
SimpleWebConsolePlugin implements OsgiManage
}
// write the state only
- resp.setContentType( "application/json" ); //$NON-NLS-1$
- resp.setCharacterEncoding( "UTF-8" ); //$NON-NLS-1$
+ resp.setContentType( "application/json" );
+ resp.setCharacterEncoding( "UTF-8" );
if ( null == getBundleContext() ) {
// refresh package on the web console itself or some of
it's dependencies
- resp.getWriter().print("false"); //$NON-NLS-1$
+ resp.getWriter().print("false");
} else {
- resp.getWriter().print( "{\"fragment\":" +
isFragmentBundle( bundle ) //$NON-NLS-1$
- + ",\"stateRaw\":" + bundle.getState() + "}" );
//$NON-NLS-1$ //$NON-NLS-2$
+ resp.getWriter().print( "{\"fragment\":" +
isFragmentBundle( bundle )
+ + ",\"stateRaw\":" + bundle.getState() + "}" );
}
return;
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesProvidedInfoProvider.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesProvidedInfoProvider.java
index e8ea63cf58..a32790e593 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesProvidedInfoProvider.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesProvidedInfoProvider.java
@@ -53,7 +53,7 @@ public class CapabilitiesProvidedInfoProvider implements
BundleInfoProvider
@Override
public String getName( Locale locale )
{
- return localization.getResourceBundle( locale ).getString(
"capabilities.provided.info.name" ); //$NON-NLS-1$;
+ return localization.getResourceBundle( locale ).getString(
"capabilities.provided.info.name" );
}
/**
@@ -100,8 +100,8 @@ public class CapabilitiesProvidedInfoProvider implements
BundleInfoProvider
private BundleInfo toInfo( BundleCapability capability, BundleWiring
wiring, String webConsoleRoot, Locale locale )
{
- final String descr = localization.getResourceBundle( locale
).getString( "capabilities.provided.info.descr" ); //$NON-NLS-1$;
- String name = localization.getResourceBundle( locale ).getString(
"capabilities.provided.info.key" ); //$NON-NLS-1$;
+ final String descr = localization.getResourceBundle( locale
).getString( "capabilities.provided.info.descr" );;
+ String name = localization.getResourceBundle( locale ).getString(
"capabilities.provided.info.key" );;
String requirerBundles = wiring.getProvidedWires(
capability.getNamespace() ).stream()
.map( w -> w.getRequirer().getSymbolicName() + " (" +
w.getRequirer().getBundle().getBundleId() + ")" )
.collect( Collectors.joining( ", ") );
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesRequiredInfoProvider.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesRequiredInfoProvider.java
index 4bbb0a8402..685257234e 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesRequiredInfoProvider.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/CapabilitiesRequiredInfoProvider.java
@@ -47,7 +47,7 @@ public class CapabilitiesRequiredInfoProvider implements
BundleInfoProvider
@Override
public String getName( Locale locale )
{
- return localization.getResourceBundle( locale ).getString(
"capabilities.required.info.name" ); //$NON-NLS-1$;
+ return localization.getResourceBundle( locale ).getString(
"capabilities.required.info.name" );
}
@Override
@@ -70,7 +70,7 @@ public class CapabilitiesRequiredInfoProvider implements
BundleInfoProvider
private BundleInfo toInfo( BundleRequirement requirement, BundleWiring
wiring, String webConsoleRoot, Locale locale )
{
- final String descr = localization.getResourceBundle( locale
).getString( "capabilities.required.info.descr" ); //$NON-NLS-1$;
+ final String descr = localization.getResourceBundle( locale
).getString( "capabilities.required.info.descr" );;
List<BundleWire> wires = wiring.getRequiredWires(
requirement.getNamespace() );
if ( wires == null )
{
@@ -78,14 +78,14 @@ public class CapabilitiesRequiredInfoProvider implements
BundleInfoProvider
}
Optional<Bundle> providerBundle = wires.stream()
.map( w -> w.getProvider().getBundle() ).findFirst(); // only
the first one is returned
- String name = localization.getResourceBundle( locale ).getString(
"capabilities.required.info.key" ); //$NON-NLS-1$;
+ String name = localization.getResourceBundle( locale ).getString(
"capabilities.required.info.key" );;
name = MessageFormat.format( name, requirement.getNamespace(),
CapabilitiesPrinter.dumpDirectives( requirement.getDirectives() ) );
String link = "/#"; // use empty link type to prevent the pattern
<name>=<value> being used for printing
if ( providerBundle.isPresent() )
{
name += MessageFormat.format( localization.getResourceBundle(
locale ).getString( "capabilities.required.info.key.addition" ),
providerBundle.get().getSymbolicName(), providerBundle.get().getBundleId() );
if ( webConsoleRoot != null ) {
- link = webConsoleRoot + "/bundles/" +
providerBundle.get().getBundleId(); //$NON-NLS-1$
+ link = webConsoleRoot + "/bundles/" +
providerBundle.get().getBundleId();
}
}
return new BundleInfo( name, link, BundleInfoType.LINK, descr );
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
index f1083874e0..f6e0593a3f 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
@@ -40,9 +40,9 @@ public final class PermissionsConfigurationPrinter extends
AbstractConfiguration
private static final String TITLE = "Permissions";
- private static final String PERMISSION_ADMIN_NAME =
"org.osgi.service.permissionadmin.PermissionAdmin"; //$NON-NLS-1$
+ private static final String PERMISSION_ADMIN_NAME =
"org.osgi.service.permissionadmin.PermissionAdmin";
- private static final String CONDITIONAL_PERMISSION_ADMIN_NAME =
"org.osgi.service.condpermadmin.ConditionalPermissionAdmin"; //$NON-NLS-1$
+ private static final String CONDITIONAL_PERMISSION_ADMIN_NAME =
"org.osgi.service.condpermadmin.ConditionalPermissionAdmin";
/**
@@ -117,7 +117,7 @@ public final class PermissionsConfigurationPrinter extends
AbstractConfiguration
hasPermissions = true;
//final ConditionalPermissionInfo info =
(ConditionalPermissionInfo) list.get(i);
final ConditionalPermissionInfo info =
(ConditionalPermissionInfo) e.nextElement();
- pw.print(" "); //$NON-NLS-1$
+ pw.print(" ");
pw.print(info.getName());
if (getAccessDecision != null)
@@ -125,9 +125,9 @@ public final class PermissionsConfigurationPrinter extends
AbstractConfiguration
try
{
final Object ad = getAccessDecision.invoke( info,
( Object[] ) null );
- pw.print(" ("); //$NON-NLS-1$
+ pw.print(" (");
pw.print(ad);
- pw.print(")"); //$NON-NLS-1$
+ pw.print(")");
}
catch (Throwable t)
{
@@ -165,7 +165,7 @@ public final class PermissionsConfigurationPrinter extends
AbstractConfiguration
{
for (int i = 0, len = infos.length; i < len; i++)
{
- pw.print(" "); //$NON-NLS-1$
+ pw.print(" ");
pw.println(infos[i].getEncoded());
}
}
@@ -182,7 +182,7 @@ public final class PermissionsConfigurationPrinter extends
AbstractConfiguration
{
for (int i = 0, len = infos.length; i < len; i++)
{
- pw.print(" "); //$NON-NLS-1$
+ pw.print(" ");
pw.println(infos[i].getEncoded());
}
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
index 5f8ff81b8a..a49a1f5499 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesServlet.java
@@ -107,8 +107,8 @@ public class ServicesServlet extends SimpleWebConsolePlugin
implements OsgiManag
}
/** the label for the services plugin */
- public static final String LABEL = "services"; //$NON-NLS-1$
- private static final String TITLE = "%services.pluginTitle"; //$NON-NLS-1$
+ public static final String LABEL = "services";
+ private static final String TITLE = "%services.pluginTitle";
private static final String CSS[] = null;
// an LDAP filter, that is used to search services
@@ -121,7 +121,7 @@ public class ServicesServlet extends SimpleWebConsolePlugin
implements OsgiManag
super(LABEL, TITLE, CATEGORY_OSGI, CSS);
// load templates
- TEMPLATE = readTemplateFile( "/templates/services.html" );
//$NON-NLS-1$
+ TEMPLATE = readTemplateFile( "/templates/services.html" );
}
private ServiceRegistration<BundleInfoProvider> bipReg;
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesUsedInfoProvider.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesUsedInfoProvider.java
index 2139a6117c..00c8aa7895 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesUsedInfoProvider.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/ServicesUsedInfoProvider.java
@@ -55,7 +55,7 @@ final class ServicesUsedInfoProvider implements
BundleInfoProvider
*/
public String getName( Locale locale )
{
- return localization.getResourceBundle( locale ).getString(
"services.info.name" ); //$NON-NLS-1$;
+ return localization.getResourceBundle( locale ).getString(
"services.info.name" );
}
@@ -78,15 +78,15 @@ final class ServicesUsedInfoProvider implements
BundleInfoProvider
{
final String[] classes = ( String[] ) ref.getProperty(
Constants.OBJECTCLASS );
final Object id = ref.getProperty( Constants.SERVICE_ID );
- final String descr = localization.getResourceBundle( locale
).getString( "services.info.descr" ); //$NON-NLS-1$;
- String name = localization.getResourceBundle( locale ).getString(
"services.info.key" ); //$NON-NLS-1$;
+ final String descr = localization.getResourceBundle( locale
).getString( "services.info.descr" );;
+ String name = localization.getResourceBundle( locale ).getString(
"services.info.key" );;
name = MessageFormat.format( name, new Object[]
{ id, Arrays.asList( classes ).toString() } );
if ( webConsoleRoot == null )
{
return new BundleInfo( name, id, BundleInfoType.VALUE, descr );
}
- return new BundleInfo( name, webConsoleRoot + "/services/" + id,
//$NON-NLS-1$
+ return new BundleInfo( name, webConsoleRoot + "/services/" + id,
BundleInfoType.LINK, descr );
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadDumper.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadDumper.java
index 6dc7d39bac..3dc77174fd 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadDumper.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/misc/ThreadDumper.java
@@ -48,8 +48,8 @@ public class ThreadDumper
final Class<?>[] nullArgs = null;
try
{
- _getStackTrace = Thread.class.getMethod("getStackTrace",
nullArgs); //$NON-NLS-1$
- _getId = Thread.class.getMethod("getId", nullArgs); //$NON-NLS-1$
+ _getStackTrace = Thread.class.getMethod("getStackTrace", nullArgs);
+ _getId = Thread.class.getMethod("getId", nullArgs);
}
catch (Throwable e)
{
@@ -106,7 +106,7 @@ public class ThreadDumper
pw.print(getId(thread));
pw.print('/');
pw.print(thread.getName());
- pw.print(" ["); //$NON-NLS-1$
+ pw.print(" [");
pw.print("priority=");
pw.print(thread.getPriority());
pw.print(", alive=");
@@ -135,7 +135,7 @@ public class ThreadDumper
{
pw.print("ThreadGroup ");
pw.print(group.getName());
- pw.print(" ["); //$NON-NLS-1$
+ pw.print(" [");
pw.print("maxprio=");
pw.print(group.getMaxPriority());
@@ -200,14 +200,14 @@ public class ThreadDumper
pw.println(" Stacktrace");
if (stackTrace == null || Array.getLength(stackTrace) == 0)
{
- pw.println(" -"); //$NON-NLS-1$
+ pw.println(" -");
}
else
{
for (int i = 0, len = Array.getLength(stackTrace); i < len; i++)
{
Object/*StackTraceElement*/stackTraceElement =
Array.get(stackTrace, i);
- pw.print(" "); //$NON-NLS-1$
+ pw.print(" ");
pw.println(stackTraceElement);
}
}
@@ -286,12 +286,12 @@ public class ThreadDumper
private final String getId(Thread thread)
{
- String ret = ""; //$NON-NLS-1$
+ String ret = "";
if (null != getId)
{
try
{
- ret = "#" + getId.invoke(thread, (Object[]) null);
//$NON-NLS-1$
+ ret = "#" + getId.invoke(thread, (Object[]) null);
}
catch (Throwable e)
{
@@ -366,11 +366,11 @@ final class ThreadComparator implements Comparator<Thread>
String t2 = thread2.getName();
if (null == t1)
{
- t1 = ""; //$NON-NLS-1$
+ t1 = "";
}
if (null == t2)
{
- t2 = ""; //$NON-NLS-1$
+ t2 = "";
}
return t1.toLowerCase().compareTo(t2.toLowerCase());
@@ -413,11 +413,11 @@ final class ThreadGroupComparator implements
Comparator<ThreadGroup>
String t2 = thread2.getName();
if (null == t1)
{
- t1 = ""; //$NON-NLS-1$
+ t1 = "";
}
if (null == t2)
{
- t2 = ""; //$NON-NLS-1$
+ t2 = "";
}
return t1.toLowerCase().compareTo(t2.toLowerCase());
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationMetatypeSupport.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationMetatypeSupport.java
index 8c218e9aa4..48106f903a 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationMetatypeSupport.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationMetatypeSupport.java
@@ -96,8 +96,8 @@ class ConfigurationMetatypeSupport extends
ConfigurationSupport implements MetaT
{
final String key = CONF_PROPS[i++];
final String defaultValue = ConfigurationUtil.getProperty(
defaultConfig, key, CONF_PROPS[i] );
- final String name = getString( rb, "metadata." + key + ".name",
key ); //$NON-NLS-1$ //$NON-NLS-2$
- final String descr = getString( rb, "metadata." + key +
".description", key ); //$NON-NLS-1$ //$NON-NLS-2$
+ final String name = getString( rb, "metadata." + key + ".name",
key );
+ final String descr = getString( rb, "metadata." + key +
".description", key );
adList.add( new AttributeDefinitionImpl( key, name, descr,
defaultValue ) );
}
@@ -113,8 +113,8 @@ class ConfigurationMetatypeSupport extends
ConfigurationSupport implements MetaT
// log level is select - so no simple default value; requires
localized option labels
adList.add( new AttributeDefinitionImpl( OsgiManager.PROP_LOG_LEVEL,
getString( rb,
- "metadata.loglevel.name", OsgiManager.PROP_LOG_LEVEL ),
//$NON-NLS-1$
- getString( rb, "metadata.loglevel.description",
OsgiManager.PROP_LOG_LEVEL ), //$NON-NLS-1$
+ "metadata.loglevel.name", OsgiManager.PROP_LOG_LEVEL ),
+ getString( rb, "metadata.loglevel.description",
OsgiManager.PROP_LOG_LEVEL ),
AttributeDefinition.INTEGER, // type
new String[]
{ String.valueOf( ConfigurationUtil.getProperty(
defaultConfig, OsgiManager.PROP_LOG_LEVEL,
@@ -122,12 +122,12 @@ class ConfigurationMetatypeSupport extends
ConfigurationSupport implements MetaT
0, // cardinality
new String[]
{ // option labels
- getString( rb, "log.level.debug", "Debug" ), //$NON-NLS-1$
//$NON-NLS-2$
- getString( rb, "log.level.info", "Information" ),
//$NON-NLS-1$ //$NON-NLS-2$
- getString( rb, "log.level.warn", "Warn" ), //$NON-NLS-1$
//$NON-NLS-2$
- getString( rb, "log.level.error", "Error" ), //$NON-NLS-1$
//$NON-NLS-2$
+ getString( rb, "log.level.debug", "Debug" ),
+ getString( rb, "log.level.info", "Information" ),
+ getString( rb, "log.level.warn", "Warn" ),
+ getString( rb, "log.level.error", "Error" ),
}, new String[]
- { "4", "3", "2", "1" } ) ); //$NON-NLS-1$ //$NON-NLS-2$
//$NON-NLS-3$ //$NON-NLS-4$
+ { "4", "3", "2", "1" } ) );
// list plugins - requires localized plugin titles
final TreeMap namesByClassName = new TreeMap();
@@ -136,15 +136,15 @@ class ConfigurationMetatypeSupport extends
ConfigurationSupport implements MetaT
{
final String clazz = defaultPluginsClasses[i++];
final String label = defaultPluginsClasses[i];
- final String name = getString( rb, label + ".pluginTitle", label
); //$NON-NLS-1$
+ final String name = getString( rb, label + ".pluginTitle", label );
namesByClassName.put( clazz, name );
}
final String[] classes = ( String[] )
namesByClassName.keySet().toArray( new String[namesByClassName.size()] );
final String[] names = ( String[] ) namesByClassName.values().toArray(
new String[namesByClassName.size()] );
adList.add( new AttributeDefinitionImpl(
OsgiManager.PROP_ENABLED_PLUGINS, getString( rb,
- "metadata.plugins.name", OsgiManager.PROP_ENABLED_PLUGINS ),
//$NON-NLS-1$
- getString( rb, "metadata.plugins.description",
OsgiManager.PROP_ENABLED_PLUGINS ), //$NON-NLS-1$
+ "metadata.plugins.name", OsgiManager.PROP_ENABLED_PLUGINS ),
+ getString( rb, "metadata.plugins.description",
OsgiManager.PROP_ENABLED_PLUGINS ),
AttributeDefinition.STRING, classes, Integer.MIN_VALUE, names,
classes ) );
xocd = new ObjectClassDefinition()
@@ -157,7 +157,7 @@ class ConfigurationMetatypeSupport extends
ConfigurationSupport implements MetaT
@Override
public String getName()
{
- return getString( rb, "metadata.name", "Apache Felix OSGi
Management Console" ); //$NON-NLS-1$ //$NON-NLS-2$
+ return getString( rb, "metadata.name", "Apache Felix OSGi
Management Console" );
}
@@ -179,7 +179,7 @@ class ConfigurationMetatypeSupport extends
ConfigurationSupport implements MetaT
public String getDescription()
{
return getString( rb,
- "metadata.description", "Configuration of the Apache Felix
OSGi Management Console." ); //$NON-NLS-1$ //$NON-NLS-2$
+ "metadata.description", "Configuration of the Apache Felix
OSGi Management Console." );
}
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationUtil.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationUtil.java
index ef5d1840b1..ad3cc8c71c 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationUtil.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/ConfigurationUtil.java
@@ -184,7 +184,7 @@ public class ConfigurationUtil
String pv = ((String) value).trim();
if (pv.length() != 0)
{
- StringTokenizer tok = new StringTokenizer(pv, ",;");
//$NON-NLS-1$
+ StringTokenizer tok = new StringTokenizer(pv, ",;");
ret = new String[tok.countTokens()];
int i = 0;
while (tok.hasMoreTokens())
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
index 374ba8d36b..f478a296c4 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/internal/servlet/OsgiManager.java
@@ -52,6 +52,7 @@ import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import org.apache.felix.webconsole.AbstractWebConsolePlugin;
+import org.apache.felix.webconsole.DefaultVariableResolver;
import org.apache.felix.webconsole.servlet.User;
import org.apache.felix.webconsole.WebConsoleConstants;
import org.apache.felix.webconsole.WebConsoleSecurityProvider;
@@ -563,26 +564,29 @@ public class OsgiManager extends GenericServlet {
return;
}
+ final Locale locale = getConfiguredLocale(request);
+
+ // make sure to set the variable resolver
+ initRequest(request, "", locale);
+
if (pathInfo.equals("/logout")) {
+ // make sure to set the variable resolver
+ initRequest(request, "", locale);
logout(request, response);
return;
}
int slash = pathInfo.indexOf("/", 1);
- if (slash < 2)
- {
+ if (slash < 2) {
slash = pathInfo.length();
}
- final Locale locale = getConfiguredLocale(request);
final String label = pathInfo.substring(1, slash);
AbstractWebConsolePlugin plugin = getConsolePlugin(label);
- if (plugin == null)
- {
+ if (plugin == null) {
final String body404 = MessageFormat.format(
-
resourceBundleManager.getResourceBundle(bundleContext.getBundle(),
locale).getString(
- "404"),
+
resourceBundleManager.getResourceBundle(bundleContext.getBundle(),
locale).getString("404"),
new Object[] { request.getContextPath() +
request.getServletPath() + '/'
+ BundlesServlet.NAME });
response.setCharacterEncoding("utf-8");
@@ -593,6 +597,20 @@ public class OsgiManager extends GenericServlet {
return;
}
+ // make sure to set the variable resolver
+ initRequest(request, "/".concat(label), locale);
+
+ // fix for https://issues.apache.org/jira/browse/FELIX-3408
+ ensureLocaleCookieSet(request, response, locale);
+
+ // wrap the response for localization and template variable replacement
+ request = wrapRequest(request, locale);
+ response = wrapResponse(request, response, plugin);
+
+ plugin.service(request, response);
+ }
+
+ private void initRequest(final HttpServletRequest request, final String
postfix, final Locale locale) {
@SuppressWarnings("rawtypes")
final Map labelMap = holder.getLocalizedLabelMap(
resourceBundleManager, locale, this.defaultCategory );
final Object flatLabelMap = labelMap.remove(
PluginHolder.ATTR_FLAT_LABEL_MAP );
@@ -603,28 +621,15 @@ public class OsgiManager extends GenericServlet {
request.setAttribute( ATTR_LABEL_MAP_CATEGORIZED, labelMap );
final String appRoot =
request.getContextPath().concat(request.getServletPath());
request.setAttribute(ServletConstants.ATTR_APP_ROOT, appRoot);
- request.setAttribute(ServletConstants.ATTR_PLUGIN_ROOT,
appRoot.concat("/").concat(label));
+ request.setAttribute(ServletConstants.ATTR_PLUGIN_ROOT,
appRoot.concat(postfix));
request.setAttribute(ServletConstants.ATTR_CONFIGURATION,
configuration);
// deprecated request attributes
request.setAttribute(ATTR_LABEL_MAP_OLD, flatLabelMap);
request.setAttribute(ATTR_APP_ROOT_OLD, appRoot);
- // fix for https://issues.apache.org/jira/browse/FELIX-3408
- ensureLocaleCookieSet(request, response, locale);
-
- // wrap the response for localization and template variable replacement
- request = wrapRequest(request, locale);
- response = wrapResponse(request, response, plugin);
-
- // make sure to set the variable resolver
- initRequestVariableResolver(request);
-
- plugin.service(request, response);
- }
-
- private void initRequestVariableResolver(final HttpServletRequest request)
{
- final RequestVariableResolver resolver = new RequestVariableResolver();
+ @SuppressWarnings("deprecation")
+ final RequestVariableResolver resolver = new DefaultVariableResolver();
request.setAttribute(RequestVariableResolver.REQUEST_ATTRIBUTE,
resolver);
resolver.put( RequestVariableResolver.KEY_APP_ROOT, (String)
request.getAttribute( ServletConstants.ATTR_APP_ROOT ) );
resolver.put( RequestVariableResolver.KEY_PLUGIN_ROOT, (String)
request.getAttribute( ServletConstants.ATTR_PLUGIN_ROOT ) );
diff --git
a/webconsole/src/main/java/org/apache/felix/webconsole/servlet/AbstractServlet.java
b/webconsole/src/main/java/org/apache/felix/webconsole/servlet/AbstractServlet.java
index bd7ff0d1d5..857f542864 100644
---
a/webconsole/src/main/java/org/apache/felix/webconsole/servlet/AbstractServlet.java
+++
b/webconsole/src/main/java/org/apache/felix/webconsole/servlet/AbstractServlet.java
@@ -146,7 +146,7 @@ public abstract class AbstractServlet extends HttpServlet {
}
// have to send, so set the last modified header now
- response.setDateHeader( "Last-Modified", lastModified );
//$NON-NLS-1$
+ response.setDateHeader( "Last-Modified", lastModified );
}
// describe the contents