reduced eclipse i18n warning by adding $NON-NLS-1$ where appropriate

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1166013 13f79535-47bb-0310-9956-ffa450edef68
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 c8a2d9b..f41ec7a 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/ConfigurationPrinter.java
@@ -47,7 +47,7 @@
      *
      * @since 3.0
      */
-    String MODE_ALWAYS = "always";
+    String MODE_ALWAYS = "always"; //$NON-NLS-1$
 
     /**
      * The web mode - this printer is used in the web console.
@@ -58,21 +58,21 @@
      *
      * @since 3.0
      */
-    String MODE_WEB = "web";
+    String MODE_WEB = "web"; //$NON-NLS-1$
 
     /**
      * The zip mode - this printer is used in the zip.
      *
      * @since 3.0
      */
-    String MODE_ZIP = "zip";
+    String MODE_ZIP = "zip"; //$NON-NLS-1$
 
     /**
      * The txt mode - this printer is used in the txt.
      *
      * @since 3.0
      */
-    String MODE_TXT = "txt";
+    String MODE_TXT = "txt"; //$NON-NLS-1$
 
     /**
      * The optional service property specifying the modes of the printer.
@@ -84,7 +84,7 @@
      * @since 3.0
      * @deprecated Use {@link WebConsoleConstants#CONFIG_PRINTER_MODES}
      */
-    String PROPERTY_MODES = "modes";
+    String PROPERTY_MODES = "modes"; //$NON-NLS-1$
 
     /**
      * 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/DefaultBrandingPlugin.java b/webconsole/src/main/java/org/apache/felix/webconsole/DefaultBrandingPlugin.java
index a326d59..472f2d4 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/DefaultBrandingPlugin.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/DefaultBrandingPlugin.java
@@ -95,7 +95,7 @@
      * The name of the bundle entry providing branding properties for this
      * default branding plugin (value is "/META-INF/webconsole.properties").
      */
-    private static final String BRANDING_PROPERTIES = "/META-INF/webconsole.properties";
+    private static final String BRANDING_PROPERTIES = "/META-INF/webconsole.properties"; //$NON-NLS-1$
 
     private static DefaultBrandingPlugin instance;
 
@@ -140,15 +140,15 @@
         }
 
         // set the fields from the properties now
-        brandName = props.getProperty( "webconsole.brand.name", "Apache Felix Web Console" );
-        productName = props.getProperty( "webconsole.product.name", "Apache Felix" );
-        productURL = props.getProperty( "webconsole.product.url", "http://felix.apache.org" );
-        productImage = props.getProperty( "webconsole.product.image", "/res/imgs/logo.png" );
-        vendorName = props.getProperty( "webconsole.vendor.name", "The Apache Software Foundation" );
-        vendorURL = props.getProperty( "webconsole.vendor.url", "http://www.apache.org" );
-        vendorImage = props.getProperty( "webconsole.vendor.image", "/res/imgs/logo.png" );
-        favIcon = props.getProperty( "webconsole.favicon", "/res/imgs/favicon.ico" );
-        mainStyleSheet = props.getProperty( "webconsole.stylesheet", "/res/ui/webconsole.css" );
+        brandName = props.getProperty( "webconsole.brand.name", "Apache Felix Web Console" ); //$NON-NLS-1$
+        productName = props.getProperty( "webconsole.product.name", "Apache Felix" ); //$NON-NLS-1$
+        productURL = props.getProperty( "webconsole.product.url", "http://felix.apache.org" ); //$NON-NLS-1$
+        productImage = props.getProperty( "webconsole.product.image", "/res/imgs/logo.png" ); //$NON-NLS-1$
+        vendorName = props.getProperty( "webconsole.vendor.name", "The Apache Software Foundation" ); //$NON-NLS-1$
+        vendorURL = props.getProperty( "webconsole.vendor.url", "http://www.apache.org" ); //$NON-NLS-1$
+        vendorImage = props.getProperty( "webconsole.vendor.image", "/res/imgs/logo.png" ); //$NON-NLS-1$
+        favIcon = props.getProperty( "webconsole.favicon", "/res/imgs/favicon.ico" ); //$NON-NLS-1$
+        mainStyleSheet = props.getProperty( "webconsole.stylesheet", "/res/ui/webconsole.css" ); //$NON-NLS-1$
     }
 
 
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleConstants.java b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleConstants.java
index 94cbe2b..e4d3025 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleConstants.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleConstants.java
@@ -18,6 +18,7 @@
  */
 package org.apache.felix.webconsole;
 
+
 /**
  * WebConsoleConstants provides some common constants that are used by plugin
  * developers.
@@ -29,7 +30,7 @@
      * The name of the service to register as to be used as a "plugin" for
      * the OSGi Manager (value is "javax.servlet.Servlet").
      */
-    public static final String SERVICE_NAME = "javax.servlet.Servlet";
+    public static final String SERVICE_NAME = "javax.servlet.Servlet"; //$NON-NLS-1$
 
     /**
      * The URI address label under which the OSGi Manager plugin is called by
@@ -39,7 +40,7 @@
      * String value. Otherwise the {@link #SERVICE_NAME Servlet} services will
      * be ignored by the Felix Web Console and not be used as a plugin.
      */
-    public static final String PLUGIN_LABEL = "felix.webconsole.label";
+    public static final String PLUGIN_LABEL = "felix.webconsole.label"; //$NON-NLS-1$
 
     /**
      * The title under which the OSGi Manager plugin is called by
@@ -58,7 +59,7 @@
      *
      * @since 2.0.0
      */
-    public static final String PLUGIN_TITLE = "felix.webconsole.title";
+    public static final String PLUGIN_TITLE = "felix.webconsole.title"; //$NON-NLS-1$
 
     /**
      * The property marking a service as a configuration printer.
@@ -68,23 +69,23 @@
      * interfaces.
      *
      * If a service has a {@link #PLUGIN_LABEL}, {@link #PLUGIN_TITLE} and
-     * this property, it is treated as a configuration printer servce.
+     * this property, it is treated as a configuration printer service.
      *
      * @since 3.1.2; Web Console Bundle 3.1.4
      */
-    public static final String CONFIG_PRINTER_MODES = "felix.webconsole.configprinter.modes";
+    public static final String CONFIG_PRINTER_MODES = "felix.webconsole.configprinter.modes"; //$NON-NLS-1$
 
     /**
      * Name of the optional service registration property indicating that a
      * {@link ConfigurationPrinter} service will provide HTML output when used
      * in {@link ConfigurationPrinter#MODE_WEB web} mode. If this property is
      * set to <code>true</code> the configuration printer is expected to
-     * generate HTML output which will not be escaped. Otheriwse output in web
+     * generate HTML output which will not be escaped. Otherwise output in web
      * mode is escaped for plain text use.
      *
      * @since 3.1.2; Web Console Bundle 3.1.4
      */
-    public static final String CONFIG_PRINTER_WEB_UNESCAPED = "felix.webconsole.configprinter.web.unescaped";
+    public static final String CONFIG_PRINTER_WEB_UNESCAPED = "felix.webconsole.configprinter.web.unescaped"; //$NON-NLS-1$
 
     /**
      * The name of the service registration properties providing references
@@ -103,7 +104,7 @@
      *
      * @since 2.0.0
      */
-    public static final String PLUGIN_CSS_REFERENCES = "felix.webconsole.css";
+    public static final String PLUGIN_CSS_REFERENCES = "felix.webconsole.css"; //$NON-NLS-1$
 
     /**
      * The name of the request attribute providing the absolute path of the
@@ -117,7 +118,7 @@
      *
      * @since 2.0.0
      */
-    public static final String ATTR_APP_ROOT = "felix.webconsole.appRoot";
+    public static final String ATTR_APP_ROOT = "felix.webconsole.appRoot"; //$NON-NLS-1$
 
     /**
      * The name of the request attribute providing the absolute path of the
@@ -130,7 +131,7 @@
      *
      * @since 1.2.12
      */
-    public static final String ATTR_PLUGIN_ROOT = "felix.webconsole.pluginRoot";
+    public static final String ATTR_PLUGIN_ROOT = "felix.webconsole.pluginRoot"; //$NON-NLS-1$
 
     /**
      * The name of the request attribute providing a mapping of labels to page
@@ -143,7 +144,7 @@
      *
      * @since 2.0.0
      */
-    public static final String ATTR_LABEL_MAP = "felix.webconsole.labelMap";
+    public static final String ATTR_LABEL_MAP = "felix.webconsole.labelMap"; //$NON-NLS-1$
 
     /**
      * The name of the request attribute holding the {@link VariableResolver}
@@ -154,16 +155,16 @@
      * @see WebConsoleUtil#setVariableResolver(javax.servlet.ServletRequest, VariableResolver)
      * @since 3.0
      */
-    static final String ATTR_CONSOLE_VARIABLE_RESOLVER = "felix.webconsole.variable.resolver";
+    static final String ATTR_CONSOLE_VARIABLE_RESOLVER = "felix.webconsole.variable.resolver"; //$NON-NLS-1$
 
     /**
-     * The name of the request attribute holding the language {@link Map}
+     * The name of the request attribute holding the language {@link java.util.Map}
      * for the request (value is "felix.webconsole.langMap").
      *
      * This map contains the web console supported languages, which are automatically detected.
      * The keys of the map are the language codes, like "en", "en_US" .. and so-on.
      * The value for each key is the locale user-friendly name - exactly the same as
-     * returned by {@link Locale#getDisplayLanguage()}.
+     * returned by {@link java.util.Locale#getDisplayLanguage()}.
      *
      * The automatic detection of languages is very simple. It relies on having a
      * 'res/flags/[lang].gif' file in the bundle. So translators should not only provide
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 9f91465..8734002 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleSecurityProvider2.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleSecurityProvider2.java
@@ -44,7 +44,7 @@
      * {@link WebConsoleSecurityProvider#authorize(Object, String)} to
      * authorize access for certain roles.
      */
-    String USER_ATTRIBUTE = "org.apache.felix.webconsole.user";
+    String USER_ATTRIBUTE = "org.apache.felix.webconsole.user"; //$NON-NLS-1$
 
 
     /**
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
index 4190d71..6fb96d1 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/WebConsoleUtil.java
@@ -83,8 +83,9 @@
         }
 
         final DefaultVariableResolver resolver = new DefaultVariableResolver();
-        resolver.put( "appRoot", request.getAttribute( WebConsoleConstants.ATTR_APP_ROOT ) );
-        resolver.put( "pluginRoot", request.getAttribute( WebConsoleConstants.ATTR_PLUGIN_ROOT ) );
+        // FIXME: don't we need a constant for the values below?
+        resolver.put( "appRoot", request.getAttribute( WebConsoleConstants.ATTR_APP_ROOT ) ); //$NON-NLS-1$
+        resolver.put( "pluginRoot", request.getAttribute( WebConsoleConstants.ATTR_PLUGIN_ROOT ) ); //$NON-NLS-1$
         setVariableResolver( request, resolver );
         return resolver;
     }
@@ -205,16 +206,16 @@
                                 final HttpServletResponse response,
                                 String redirectUrl) throws IOException {
         // check for relative URL
-        if ( !redirectUrl.startsWith("/") ) {
+        if ( !redirectUrl.startsWith("/") ) { //$NON-NLS-1$
             String base = request.getContextPath() + request.getServletPath() + request.getPathInfo();
             int i = base.lastIndexOf('/');
             if (i > -1) {
                 base = base.substring(0, i);
             } else {
                 i = base.indexOf(':');
-                base = (i > -1) ? base.substring(i + 1, base.length()) : "";
+                base = (i > -1) ? base.substring(i + 1, base.length()) : ""; //$NON-NLS-1$
             }
-            if (!base.startsWith("/")) {
+            if (!base.startsWith("/")) { //$NON-NLS-1$
                 base = '/' + base;
             }
             redirectUrl = base + '/' + redirectUrl;
@@ -234,12 +235,12 @@
      * @param response The response for which to set the cache prevention
      */
     public static final void setNoCache(final HttpServletResponse response) {
-        response.setHeader("Cache-Control", "no-cache");
-        response.addHeader("Cache-Control", "no-store");
-        response.addHeader("Cache-Control", "must-revalidate");
-        response.addHeader("Cache-Control", "max-age=0");
-        response.setHeader("Expires", "Thu, 01 Jan 1970 01:00:00 GMT");
-        response.setHeader("Pragma", "no-cache");
+        response.setHeader("Cache-Control", "no-cache"); //$NON-NLS-1$ //$NON-NLS-2$
+        response.addHeader("Cache-Control", "no-store"); //$NON-NLS-1$ //$NON-NLS-2$
+        response.addHeader("Cache-Control", "must-revalidate"); //$NON-NLS-1$ //$NON-NLS-2$
+        response.addHeader("Cache-Control", "max-age=0"); //$NON-NLS-1$ //$NON-NLS-2$
+        response.setHeader("Expires", "Thu, 01 Jan 1970 01:00:00 GMT"); //$NON-NLS-1$ //$NON-NLS-2$
+        response.setHeader("Pragma", "no-cache"); //$NON-NLS-1$ //$NON-NLS-2$
     }
 
     /**
@@ -346,8 +347,8 @@
      * because the platforms before 1.4 and most notably some OSGi Execution
      * Environments (such as Minimum EE) do not provide the newer method.
      *
-     * @param value
-     * @return
+     * @param value the value to decode
+     * @return the decoded string
      */
     public static String urlDecode( final String value )
     {
@@ -359,7 +360,7 @@
 
         try
         {
-            return URLDecoder.decode( value, "UTF-8" );
+            return URLDecoder.decode( value, "UTF-8" ); //$NON-NLS-1$
         }
         catch ( Throwable t )
         {
@@ -383,7 +384,7 @@
     {
         if (value == null)
         {
-            return "n/a";
+            return "n/a"; //$NON-NLS-1$
         }
         else if (value.getClass().isArray())
         {
@@ -398,7 +399,7 @@
                     if (element instanceof Byte)
                     {
                         // convert byte[] to hex string
-                        sb.append("0x");
+                        sb.append("0x"); //$NON-NLS-1$
                         final String x = Integer.toHexString(((Byte) element).intValue() & 0xff);
                         if (1 == x.length())
                         {
@@ -413,7 +414,7 @@
 
                     if (i < len - 1)
                     {
-                        sb.append(", ");
+                        sb.append(", "); //$NON-NLS-1$
                     }
                 }
                 return sb.append(']').toString();