Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #497: adopt build for java 11 #498

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion pippo-content-type-parent/pippo-csv/pom.xml
Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.16.6</version>
<version>1.18.6</version>
<scope>test</scope>
</dependency>

Expand Down
Expand Up @@ -462,7 +462,7 @@ private Set<String> getContentTypes(Request request) {
/*
* Cleans a complex content-type or accept header value by removing the
* quality scores.
* <p/>
* <p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* <pre>
* text/html,application/xhtml+xml,application/xml;q=0.9,image/webp
* </pre>
Expand Down
Expand Up @@ -180,10 +180,11 @@ public static <T extends Annotation> T getAnnotation(Class<?> objectClass, Class
* Class} object, including public, protected, default (package)
* access, and private methods, <b>but excluding inherited methods</b>.
*
* <p>This method differs from {@link Class#getDeclaredMethods()} since it
* <p>
* This method differs from {@link Class#getDeclaredMethods()} since it
* does <b>not return bridge methods</b>, in other words, only the methods of
* the class are returned. <b>If you just want the methods declared in
* {@code clazz} use this method!</b></p>
* {@code clazz} use this method!</b>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without </p>, are you sure?

*
* @param clazz Class
*
Expand Down
Expand Up @@ -68,7 +68,7 @@ public <T extends Controller> T createController(Class<T> controllerClass) {
/**
* Created a bean definition for a class.
* Optionally configure all bean properties, like scope, prototype/singleton, etc using:
* <p/>
* <p>
* <pre>
* BeanDefinition definition = super.createBeanDefinition(beanClass);
* definition.setScope(BeanDefinition.SCOPE_SINGLETON);
Expand Down
7 changes: 7 additions & 0 deletions pippo-core/pom.xml
Expand Up @@ -22,6 +22,13 @@
<scope>provided</scope>
</dependency>

<!-- Jaxb -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Expand Up @@ -107,7 +107,7 @@ public Application getApplication() {

/**
* Override this method if you want to customize the {@link PippoFilter}.
* <p/>
* <p>
* <pre>
* protected PippoFilter createPippoFilter() {
* PippoFilter pippoFilter = super.createPippoFilter();
Expand Down
Expand Up @@ -108,7 +108,7 @@ public ContentTypeEngine registerContentTypeEngine(Class<? extends ContentTypeEn
/**
* Returns the first matching content type engine for a content type suffix (json, xml, yaml), a
* simple content type (application/json) or a complex accept header like:
* <p/>
* <p>
* <pre>
* text/html,application/xhtml+xml,application/xml;q=0.9,image/webp
* </pre>
Expand Down Expand Up @@ -152,7 +152,7 @@ public void setContentTypeEngine(ContentTypeEngine engine) {
/**
* Cleans a complex content-type or accept header value by removing the
* quality scores.
* <p/>
* <p>
* <pre>
* text/html,application/xhtml+xml,application/xml;q=0.9,image/webp
* </pre>
Expand Down
6 changes: 3 additions & 3 deletions pippo-core/src/main/java/ro/pippo/core/DefaultUriMatcher.java
Expand Up @@ -181,7 +181,7 @@ private Map<String, String> getParameters(UriPatternBinding binding, String requ

/**
* Transforms an url pattern like "/{name}/id/*" into a regex like "/([^/]*)/id/*."
* <p/>
* <p>
* Also handles regular expressions if defined inside routes:
* For instance "/users/{username: [a-zA-Z][a-zA-Z_0-9]}" becomes
* "/users/([a-zA-Z][a-zA-Z_0-9])"
Expand Down Expand Up @@ -242,9 +242,9 @@ private String replacePosixClasses(String input) {

/**
* Extracts the name of the parameters from a route
* <p/>
* <p>
* /{my_id}/{my_name}
* <p/>
* <p>
* would return a List with "my_id" and "my_name"
*
* @param uriPattern
Expand Down
1 change: 0 additions & 1 deletion pippo-core/src/main/java/ro/pippo/core/ErrorHandler.java
Expand Up @@ -23,7 +23,6 @@
* {@link ErrorHandler} can register custom {@link ExceptionHandler}s and will handle an exception
* with a matching {@code ExceptionHandler}, if found. Otherwise {@code ErrorHandler} will fallback
* to itself to handle the exception.
* </p>
*
* @author Decebal Suiu
*/
Expand Down
8 changes: 4 additions & 4 deletions pippo-core/src/main/java/ro/pippo/core/FileItem.java
Expand Up @@ -39,7 +39,7 @@ public FileItem(Part part) {
/**
* Gets the name of this part
*
* @return The name of this part as a <tt>String</tt>
* @return The name of this part as a <code>String</code>
*/
public String getName() {
return part.getName();
Expand Down Expand Up @@ -87,11 +87,11 @@ public String getContentType() {
}

/**
* Gets the content of this part as an <tt>InputStream</tt>
* Gets the content of this part as an <code>InputStream</code>
*
* @return The content of this file as an <tt>InputStream</tt>
* @return The content of this file as an <code>InputStream</code>
* @throws IOException If an error occurs in retrieving the content
* as an <tt>InputStream</tt>
* as an <code>InputStream</code>
*/
public InputStream getInputStream() throws IOException {
return part.getInputStream();
Expand Down
11 changes: 4 additions & 7 deletions pippo-core/src/main/java/ro/pippo/core/Languages.java
Expand Up @@ -27,9 +27,9 @@
import java.util.concurrent.ConcurrentHashMap;

/**
* The Languages class manages the language and Locale of a Request & Response
* The Languages class manages the language and Locale of a Request &amp; Response
* cycle. It can optionally persist a Language preference as a cookie.
* <p/>
* <p>
* This class is based on LangImpl.java from the Ninja Web Framework.
*
* @author James Moger
Expand Down Expand Up @@ -96,7 +96,6 @@ public String getLanguageComponent(String language) {
* For example, this application may have Portuguese (pt) as a registered
* language but not Brazilian Portuguese (pt-BR). In this case, pt-BR would
* be supported because of the pt registration.
* </p>
*
* @param language
* @return true if the language is supported
Expand All @@ -115,7 +114,6 @@ public boolean isSupportedLanguage(String language) {
* (messages_pt-BR.properties). In this case, pt-BR is not a registered
* language, though it may be a supported language by the 'pt' language
* component.
* </p>
*
* @param language
* @return true if the language is registered
Expand Down Expand Up @@ -149,7 +147,6 @@ public void clearLanguageCookie(Response response) {
* <p>
* If the language does not match a registered language or language
* component an exception is thrown.
* </p>
*
* @param language
* @param routeContext
Expand All @@ -166,7 +163,7 @@ public void setLanguageCookie(String language, RouteContext routeContext) {
}

/**
* Returns the language for the request. This process considers Request &
* Returns the language for the request. This process considers Request &amp;
* Response cookies, the Request ACCEPT_LANGUAGE header, and finally the
* application default language.
*
Expand Down Expand Up @@ -203,7 +200,7 @@ public String getLanguageOrDefault(RouteContext routeContext) {
}

/**
* Returns the Java Locale for the Request & Response cycle. If the language
* Returns the Java Locale for the Request &amp; Response cycle. If the language
* specified in the Request/Response cycle can not be mapped to a Java
* Locale, the default language Locale is returned.
*
Expand Down
20 changes: 6 additions & 14 deletions pippo-core/src/main/java/ro/pippo/core/Messages.java
Expand Up @@ -38,7 +38,7 @@
/**
* Loads and caches message resource files based on the registered languages in
* application.properties.
* <p/>
* <p>
* This class is based on MessagesImpl.java from the Ninja Web Framework.
*
* @author James Moger
Expand All @@ -58,7 +58,7 @@ public Messages(Languages languages) {

/**
* Gets the requested localized message.
* <p/>
* <p>
* <p>
* The current Request and Response are used to help determine the messages
* resource to use.
Expand All @@ -71,11 +71,9 @@ public Messages(Languages languages) {
* <p>
* The message can be formatted with optional arguments using the
* {@link java.text.MessageFormat} syntax.
* </p>
* <p>
* If the key does not exist in the messages resource, then the key name is
* returned.
* </p>
*
* @param key
* @param routeContext
Expand All @@ -89,7 +87,7 @@ public String get(String key, RouteContext routeContext, Object... args) {

/**
* Gets the requested localized message.
* <p/>
* <p>
* <ol>
* <li>Exact locale match, return the registered locale message
* <li>Language match but not a locale match, return the registered language
Expand All @@ -99,11 +97,9 @@ public String get(String key, RouteContext routeContext, Object... args) {
* <p>
* The message can be formatted with optional arguments using the
* {@link java.text.MessageFormat} syntax.
* </p>
* <p>
* If the key does not exist in the messages resource, then the key name is
* returned.
* </p>
*
* @param key
* @param language
Expand All @@ -123,7 +119,7 @@ public String get(String key, String language, Object... args) {

/**
* Gets the requested localized message.
* <p/>
* <p>
* <p>
* The current Request and Response are used to help determine the messages
* resource to use.
Expand All @@ -136,11 +132,9 @@ public String get(String key, String language, Object... args) {
* <p>
* The message can be formatted with optional arguments using the
* {@link java.text.MessageFormat} syntax.
* </p>
* <p>
* If the key does not exist in the messages resource, then the key name is
* returned.
* </p>
*
* @param key
* @param defaultMessage
Expand All @@ -155,7 +149,7 @@ public String getWithDefault(String key, String defaultMessage, RouteContext rou

/**
* Gets the requested localized message.
* <p/>
* <p>
* <p>
* The current Request and Response are used to help determine the messages
* resource to use.
Expand All @@ -168,7 +162,6 @@ public String getWithDefault(String key, String defaultMessage, RouteContext rou
* <p>
* The message can be formatted with optional arguments using the
* {@link java.text.MessageFormat} syntax.
* </p>
*
* @param key
* @param defaultMessage
Expand Down Expand Up @@ -196,7 +189,6 @@ public String getWithDefault(String key, String defaultMessage, String language,
* messages
* <li>Return the default messages
* </ol>
* </p>
*
* @param routeContext
* @return all localized messages
Expand Down Expand Up @@ -356,7 +348,7 @@ private Properties loadMessages(String fileOrUrl) {
/**
* Retrieves the messages from an arbitrary one or two component language
* String ("en-US", or "en" or "de"...).
* <p/>
* <p>
*
* @param language A one or two component language code such as "en", "en-US", or
* "en-US,en;q=0.8,de;q=0.6".
Expand Down
6 changes: 3 additions & 3 deletions pippo-core/src/main/java/ro/pippo/core/ParameterValue.java
Expand Up @@ -295,7 +295,7 @@ public <T> Set<T> toSet(Class<T> classOfT) {
*
* @param classOfT
* @param pattern optional pattern for interpreting the underlying request
* string value. (used for date & time conversions)
* string value. (used for date &amp; time conversions)
* @return a set of the values
*/
public <T> Set<T> toSet(Class<T> classOfT, String pattern) {
Expand Down Expand Up @@ -393,7 +393,7 @@ public <T> T to(Class<T> classOfT) {
*
* @param classOfT
* @param pattern optional pattern for interpreting the underlying request
* string value. (used for date & time conversions)
* string value. (used for date &amp; time conversions)
* @return an object
*/
@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -437,7 +437,7 @@ public <T, C extends Converter<T>> T convert(Class<C> converterClass, String pat
* @param collectionClass
* @param classOfT
* @param pattern optional pattern for interpreting the underlying request
* string value. (used for date & time conversions)
* string value. (used for date &amp; time conversions)
* @return a collection of the values
*/
@SuppressWarnings("unchecked")
Expand Down
9 changes: 2 additions & 7 deletions pippo-core/src/main/java/ro/pippo/core/Pippo.java
Expand Up @@ -87,16 +87,12 @@ public WebServer getServer() {
* Entry point for a custom WebServer.
* The idea is to create a custom WebServer if you want to override some aspects (method) of that server or
* if you want free access to the servlet container (Jetty, Tomcat, ...).
*
* <p>
* Show below the code for a <@code>JettyServer</@code> with persistent sessions.
* </p>
*
* Show below the code for a <code>JettyServer</code> with persistent sessions.
* <pre>
* <@code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this particular entry has incorrect <@code> syntax (instead of ${@code})

* public class MyJettyServer extends JettyServer {
*
* @Override
* &#064;Override
* protected ServletContextHandler createPippoHandler() {
* ServletContextHandler handler = super.createPippoHandler();
*
Expand All @@ -122,7 +118,6 @@ public WebServer getServer() {
* }
*
* }
* </@code>
* </pre>
*
* @param server
Expand Down
6 changes: 3 additions & 3 deletions pippo-core/src/main/java/ro/pippo/core/PippoFilter.java
Expand Up @@ -185,17 +185,17 @@ protected void processRequest(Request request, Response response) throws IOExcep
* Please note that you must subclass {@code PippoFilter.init(FilterConfig)} and set your filter path
* before you call {@code super.init(filterConfig)}.
* For example:
* {@code
* <pre>
* class MyPippoFilter extends PippoFilter {
*
* @Override
* &#064;Override
* public void init(FilterConfig filterConfig) throws ServletException {
* setFilterPath("/*");
* super.init(filterConfig);
* }
*
* }
* }
* </pre>
*
* @param urlPattern
*/
Expand Down