diff --git a/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java b/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java index 8dd35b80b39..d007d6f666a 100644 --- a/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java +++ b/jetty-gcloud/jetty-gcloud-session-manager/src/main/java/org/eclipse/jetty/gcloud/session/GCloudSessionDataStore.java @@ -838,12 +838,10 @@ public class GCloudSessionDataStore extends AbstractSessionDataStore /** * Check to see if indexes are available, in which case * we can do more performant queries. - * @return + * @return true if indexes are available */ - protected boolean checkIndexes () + protected boolean checkIndexes() { - long start =0; - try { Query query = Query.newProjectionEntityQueryBuilder() diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java index 8e9b0af47c1..8ac17b67d50 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/ServerSupport.java @@ -183,7 +183,7 @@ public class ServerSupport if (files == null || files.isEmpty()) return server; - Map lastMap = new HashMap(); + Map lastMap = new HashMap<>(); if (server != null) lastMap.put("Server", server); @@ -231,7 +231,7 @@ public class ServerSupport * @param files the xml configs to apply * @return the Server after application of configs * - * @throws Exception + * @throws Exception if unable to apply the xml configuration */ public static Server applyXmlConfigurations (Server server, List files) throws Exception diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java index 9d99d8cfd99..57a27600626 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/Starter.java @@ -240,7 +240,7 @@ public class Starter } /** - * @param args + * @param args Starter arguments */ public static final void main(String[] args) { diff --git a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/WebAppPropertyConverter.java b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/WebAppPropertyConverter.java index 2b056993acd..e87a08e9d31 100644 --- a/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/WebAppPropertyConverter.java +++ b/jetty-maven-plugin/src/main/java/org/eclipse/jetty/maven/plugin/WebAppPropertyConverter.java @@ -53,7 +53,7 @@ public class WebAppPropertyConverter * @param webApp the webapp to convert * @param propsFile the file to put the properties into * @param contextXml the optional context xml file related to the webApp - * @throws Exception + * @throws Exception if any I/O exception occurs */ public static void toProperties(JettyWebAppContext webApp, File propsFile, String contextXml) throws Exception @@ -114,7 +114,7 @@ public class WebAppPropertyConverter //web-inf lib List deps = webApp.getWebInfLib(); - StringBuffer strbuff = new StringBuffer(); + StringBuilder strbuff = new StringBuilder(); if (deps != null) { for (int i=0; i jettyProperties) throws Exception @@ -164,7 +164,7 @@ public class WebAppPropertyConverter * @param propsFile the properties to apply * @param server the Server instance to use if there is a context xml file to apply * @param jettyProperties jetty properties to use if there is a context xml file to apply - * @throws Exception + * @throws Exception if any I/O exception occurs */ public static void fromProperties (JettyWebAppContext webApp, File propsFile, Server server, Map jettyProperties) throws Exception @@ -251,7 +251,7 @@ public class WebAppPropertyConverter //the pom to override the context xml file, but as the other mojos all //configure a WebAppContext in the pom (the element), it is //already configured by the time the context xml file is applied. - str = (String)props.getProperty("context.xml"); + str = props.getProperty("context.xml"); if (!StringUtil.isBlank(str)) { XmlConfiguration xmlConfiguration = new XmlConfiguration(Resource.newResource(str).getURI().toURL()); diff --git a/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java b/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java index 4862fe5a450..7c365f74391 100644 --- a/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java +++ b/jetty-memcached/jetty-memcached-sessions/src/main/java/org/eclipse/jetty/memcached/session/MemcachedSessionDataMap.java @@ -87,7 +87,7 @@ public class MemcachedSessionDataMap extends AbstractLifeCycle implements Sessio /** - * @param sec + * @param sec the expiry to use in seconds */ public void setExpirySec (int sec) { diff --git a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStoreFactory.java b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStoreFactory.java index 837b42e144a..3bdcae10b14 100644 --- a/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStoreFactory.java +++ b/jetty-nosql/src/main/java/org/eclipse/jetty/nosql/mongodb/MongoSessionDataStoreFactory.java @@ -126,8 +126,7 @@ public class MongoSessionDataStoreFactory extends AbstractSessionDataStoreFactor /** - * @throws MongoException - * @throws UnknownHostException + * @throws Exception {@link UnknownHostException} if any issue while resolving MongoDB Host * @see org.eclipse.jetty.server.session.SessionDataStoreFactory#getSessionDataStore(org.eclipse.jetty.server.session.SessionHandler) */ @Override diff --git a/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/ContainerTldBundleDiscoverer.java b/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/ContainerTldBundleDiscoverer.java index 4f8bfbda9be..cd447484a48 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/ContainerTldBundleDiscoverer.java +++ b/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/ContainerTldBundleDiscoverer.java @@ -146,7 +146,7 @@ public class ContainerTldBundleDiscoverer implements TldBundleDiscoverer /** * Check that jsp is on the classpath - * @return + * @return true if jsp is available in the environment */ public boolean isJspAvailable() { @@ -195,7 +195,7 @@ public class ContainerTldBundleDiscoverer implements TldBundleDiscoverer /** * Find the bundle that contains a jstl implementation class, which assumes that * the jstl taglibs will be inside the same bundle. - * @return + * @return Bundle contains the jstl implementation class */ public Bundle findJstlBundle () { diff --git a/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/JSTLBundleDiscoverer.java b/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/JSTLBundleDiscoverer.java index dff0f0663bc..b82ea832cb6 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/JSTLBundleDiscoverer.java +++ b/jetty-osgi/jetty-osgi-boot-jsp/src/main/java/org/eclipse/jetty/osgi/boot/jasper/JSTLBundleDiscoverer.java @@ -120,7 +120,7 @@ public class JSTLBundleDiscoverer implements TldBundleDiscoverer * Unsupported: the bundle is a jar that embeds more jars. * * @return array of URLs - * @throws Exception + * @throws Exception In case of errors during resolving TLDs files */ public URL[] getUrlsForBundlesWithTlds(DeploymentManager deployer, BundleFileLocatorHelper locatorHelper) throws Exception { diff --git a/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/WarUrlActivator.java b/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/WarUrlActivator.java index f2b635d3188..1b6bb87e7d7 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/WarUrlActivator.java +++ b/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/WarUrlActivator.java @@ -39,7 +39,7 @@ public class WarUrlActivator implements BundleActivator /** * Register the url stream handler factory. * - * @param context + * @param context the {@link BundleContext} to use */ @SuppressWarnings("unchecked") public void start(BundleContext context) throws Exception diff --git a/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/internal/WarURLConnection.java b/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/internal/WarURLConnection.java index baf72f2a4c5..832df0911ae 100644 --- a/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/internal/WarURLConnection.java +++ b/jetty-osgi/jetty-osgi-boot-warurl/src/main/java/org/eclipse/jetty/osgi/boot/warurl/internal/WarURLConnection.java @@ -52,6 +52,7 @@ public class WarURLConnection extends URLConnection * a new temporary file ust to replace the manifest. * @param newmanifest The new manifest * @param rawIn The file input stream or equivalent. not the jar input stream. + * @throws IOException if an I/O error occurs. */ public static InputStream substitueManifest(final Manifest newmanifest, final InputStream rawIn) throws IOException @@ -106,6 +107,7 @@ public class WarURLConnection extends URLConnection * @param url The file url (for example) * @param mf The manifest to use as a replacement to the jar file inside * the file url. + * @throws IOException if an I/O error occurs. */ public WarURLConnection(URL url, Manifest mf) throws IOException { diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/TldBundleDiscoverer.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/TldBundleDiscoverer.java index 63136dd7afd..98d2a810c1b 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/TldBundleDiscoverer.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/TldBundleDiscoverer.java @@ -33,10 +33,10 @@ public interface TldBundleDiscoverer /** * Find bundles that contain tlds and convert into URL references to their location. * - * @param manager - * @param fileLocator + * @param manager The {@link DeploymentManager} instance to use + * @param fileLocator the {@link BundleFileLocatorHelper} instance to use * @return array of URLs representing locations of tld containing bundles - * @throws Exception + * @throws Exception In case of errors during resolving TLDs files */ URL[] getUrlsForBundlesWithTlds(DeploymentManager manager, BundleFileLocatorHelper fileLocator) throws Exception; diff --git a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java index a2bb3c47d66..d4552452e9c 100644 --- a/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java +++ b/jetty-osgi/jetty-osgi-boot/src/main/java/org/eclipse/jetty/osgi/boot/utils/Util.java @@ -42,12 +42,12 @@ public class Util /** * Create an osgi filter for the given classname and server name. * - * @param bundleContext + * @param bundleContext the {@link BundleContext} instance to use * @param classname the class to match on the filter * @param managedServerName the name of the jetty server instance * @return a new filter * - * @throws InvalidSyntaxException + * @throws InvalidSyntaxException If the filter contains an invalid string that cannot be parsed. */ public static Filter createFilter (BundleContext bundleContext, String classname, String managedServerName) throws InvalidSyntaxException {