Skip to content

Commit

Permalink
Updated dependencies and allow support for JDK 16 source
Browse files Browse the repository at this point in the history
  • Loading branch information
tazmaniax committed Jun 27, 2021
1 parent a0832fb commit a481dd3
Show file tree
Hide file tree
Showing 70 changed files with 145 additions and 130 deletions.
72 changes: 36 additions & 36 deletions framework/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,22 @@ transitiveDependencies: false
# This core dependencies are required by Play framework
require: &allDependencies
- antlr 2.7.7
- com.mchange -> c3p0 0.9.5.2
- com.zaxxer -> HikariCP 3.4.5
- org.ow2.asm -> asm 9.0
- org.ow2.asm -> asm-commons 9.0
- org.ow2.asm -> asm-util 9.0
- org.ow2.asm -> asm-tree 9.0
- org.ow2.asm -> asm-analysis 9.0
- com.mchange -> c3p0 0.9.5.5
- com.zaxxer -> HikariCP 4.0.3
- org.ow2.asm -> asm 9.2
- org.ow2.asm -> asm-commons 9.2
- org.ow2.asm -> asm-util 9.2
- org.ow2.asm -> asm-tree 9.2
- org.ow2.asm -> asm-analysis 9.2
- cglib -> cglib 3.3.0
- com.google.code.gson -> gson 2.8.6
- com.jamonapi -> jamon 2.81
- com.google.code.gson -> gson 2.8.7
- com.jamonapi -> jamon 2.82
- com.ning -> async-http-client 1.9.40
- commons-beanutils 1.9.2
- commons-codec 1.10
- commons-beanutils 1.9.4
- commons-codec 1.15
- org.apache.commons -> commons-email 1.5
- commons-fileupload 1.3.2
- commons-io 2.5
- commons-fileupload 1.4
- commons-io 2.10.0
- com.google.code.maven-play-plugin.org.apache.commons -> commons-javaflow 1590792
- commons-lang 2.6
- commons-logging 1.2
Expand All @@ -34,47 +34,47 @@ require: &allDependencies
- javax.inject 1.0
- javax.validation -> validation-api 1.1.0.Final
- jaxen 1.2.0
- joda-time 2.10
- joda-time 2.10.10
- org.hamcrest -> hamcrest-all 1.3
- junit 4.12
- junit 4.13.2
- jregex 1.2_01
- log4j 1.2.17
- net.sf.ehcache -> ehcache 2.10.6
- net.sf.ehcache -> ehcache 2.10.9.2
- net.sf.ezmorph -> ezmorph 1.0.6
- net.sf.jsr107cache -> jsr107cache 1.1
- net.sf.oval -> oval 1.86
- mysql -> mysql-connector-java 8.0.22
- net.sf.oval -> oval 1.90
- mysql -> mysql-connector-java 8.0.25
- oauth.signpost -> signpost-core 1.2.1.2
- org.apache.geronimo.specs -> geronimo-servlet_2.5_spec 1.2
- org.apache.ivy -> ivy 2.4.0
- org.bouncycastle -> bcprov-jdk15on 1.61
- org.bouncycastle -> bcpkix-jdk15on 1.61
- org.codehaus.groovy -> groovy 3.0.6
- org.codehaus.groovy -> groovy-xml 3.0.6
- org.eclipse.jdt -> org.eclipse.jdt.core 3.23.0
- org.apache.ivy -> ivy 2.5.0
- org.bouncycastle -> bcprov-jdk15on 1.69
- org.bouncycastle -> bcpkix-jdk15on 1.69
- org.codehaus.groovy -> groovy 3.0.8
- org.codehaus.groovy -> groovy-xml 3.0.8
- org.eclipse.jdt -> org.eclipse.jdt.core 3.26.0
- org.hibernate -> hibernate-core 5.4.30.Final.patched
- net.bytebuddy -> byte-buddy 1.10.21
- net.bytebuddy -> byte-buddy 1.11.5
- javax.persistence -> javax.persistence-api 2.2
- org.hibernate.common -> hibernate-commons-annotations 5.1.2.Final
- org.hibernate -> hibernate-validator 5.4.1.Final
- org.jboss -> jandex 2.2.3.Final
- org.jboss.logging -> jboss-logging 3.4.1.Final
- org.jboss -> jandex 2.3.0.Final
- org.jboss.logging -> jboss-logging 3.4.2.Final
- org.jboss.spec.javax.transaction -> jboss-transaction-api_1.2_spec 1.1.1.Final
- javax.persistence -> javax.persistence-api 2.2
- javax.xml.bind -> jaxb-api 2.3.1
- org.glassfish.jaxb -> jaxb-runtime 2.3.1
- org.glassfish.jaxb -> jaxb-runtime 2.3.4
- com.fasterxml -> classmate 1.5.1
- org.hibernate -> hibernate-c3p0 5.4.30.Final
- org.hibernate -> hibernate-ehcache 5.4.30.Final
- com.mchange -> mchange-commons-java 0.2.12
- org.javassist -> javassist 3.27.0-GA
- com.mchange -> mchange-commons-java 0.2.20
- org.javassist -> javassist 3.28.0-GA
- io.netty -> netty 3.10.6.Final
- org.postgresql -> postgresql 42.2.18
- org.slf4j -> slf4j-api 1.7.22
- org.slf4j -> slf4j-log4j12 1.7.22
- org.yaml -> snakeyaml 1.17
- net.spy -> spymemcached 2.12.1
- com.thoughtworks.xstream -> xstream 1.4.9
- org.postgresql -> postgresql 42.2.22
- org.slf4j -> slf4j-api 1.7.31
- org.slf4j -> slf4j-log4j12 1.7.31
- org.yaml -> snakeyaml 1.29
- net.spy -> spymemcached 2.12.3
- com.thoughtworks.xstream -> xstream 1.4.17
- xmlpull 1.1.3.4d_b4_min

# Default repositories, used for all projects
Expand Down
Binary file removed framework/lib/HikariCP-3.4.5.jar
Binary file not shown.
Binary file added framework/lib/HikariCP-4.0.3.jar
Binary file not shown.
Binary file removed framework/lib/asm-9.0.jar
Binary file not shown.
Binary file added framework/lib/asm-9.2.jar
Binary file not shown.
Binary file removed framework/lib/asm-analysis-9.0.jar
Binary file not shown.
Binary file added framework/lib/asm-analysis-9.2.jar
Binary file not shown.
Binary file removed framework/lib/asm-commons-9.0.jar
Binary file not shown.
Binary file added framework/lib/asm-commons-9.2.jar
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/asm-util-9.0.jar
Binary file not shown.
Binary file added framework/lib/asm-util-9.2.jar
Binary file not shown.
Binary file removed framework/lib/bcpkix-jdk15on-1.61.jar
Binary file not shown.
Binary file added framework/lib/bcpkix-jdk15on-1.69.jar
Binary file not shown.
Binary file removed framework/lib/bcprov-jdk15on-1.61.jar
Binary file not shown.
Binary file added framework/lib/bcprov-jdk15on-1.69.jar
Binary file not shown.
Binary file removed framework/lib/byte-buddy-1.10.21.jar
Binary file not shown.
Binary file added framework/lib/byte-buddy-1.11.5.jar
Binary file not shown.
Binary file removed framework/lib/c3p0-0.9.5.2.jar
Binary file not shown.
Binary file added framework/lib/c3p0-0.9.5.5.jar
Binary file not shown.
Binary file removed framework/lib/classmate-1.3.4.jar
Binary file not shown.
Binary file removed framework/lib/commons-beanutils-1.9.2.jar
Binary file not shown.
Binary file added framework/lib/commons-beanutils-1.9.4.jar
Binary file not shown.
Binary file removed framework/lib/commons-codec-1.10.jar
Binary file not shown.
Binary file added framework/lib/commons-codec-1.15.jar
Binary file not shown.
Binary file removed framework/lib/commons-fileupload-1.3.2.jar
Binary file not shown.
Binary file added framework/lib/commons-fileupload-1.4.jar
Binary file not shown.
Binary file added framework/lib/commons-io-2.10.0.jar
Binary file not shown.
Binary file removed framework/lib/commons-io-2.5.jar
Binary file not shown.
Binary file removed framework/lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/ehcache-core-2.6.11.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/hibernate-c3p0-5.4.1.Final.jar
Binary file not shown.
Binary file removed framework/lib/hibernate-ehcache-5.4.1.Final.jar
Binary file not shown.
Binary file added framework/lib/ivy-2.5.0.jar
Binary file not shown.
Binary file added framework/lib/jamon-2.82.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/jaxb-runtime-2.3.1.jar
Binary file not shown.
Binary file added framework/lib/jaxb-runtime-2.3.4.jar
Binary file not shown.
Binary file removed framework/lib/jboss-logging-3.3.0.Final.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/junit-4.12.jar
Binary file not shown.
Binary file added framework/lib/junit-4.13.2.jar
Binary file not shown.
Binary file added framework/lib/mchange-commons-java-0.2.20.jar
Binary file not shown.
Binary file removed framework/lib/mysql-connector-java-8.0.22.jar
Binary file not shown.
Binary file added framework/lib/mysql-connector-java-8.0.25.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed framework/lib/slf4j-api-1.7.22.jar
Binary file not shown.
Binary file added framework/lib/slf4j-api-1.7.31.jar
Binary file not shown.
Binary file removed framework/lib/slf4j-log4j12-1.7.22.jar
Binary file not shown.
Binary file added framework/lib/slf4j-log4j12-1.7.31.jar
Binary file not shown.
Binary file removed framework/lib/snakeyaml-1.17.jar
Binary file not shown.
Binary file added framework/lib/snakeyaml-1.29.jar
Binary file not shown.
Binary file not shown.
Binary file added framework/lib/xstream-1.4.17.jar
Binary file not shown.
Binary file removed framework/lib/xstream-1.4.9.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions framework/src/play/classloading/ApplicationCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ public class ApplicationCompiler {
compatibleJavaVersions.put("12", CompilerOptions.VERSION_12);
compatibleJavaVersions.put("13", CompilerOptions.VERSION_13);
compatibleJavaVersions.put("14", CompilerOptions.VERSION_14);
compatibleJavaVersions.put("15", CompilerOptions.VERSION_15);
compatibleJavaVersions.put("16", CompilerOptions.VERSION_16);
}

/**
Expand Down
21 changes: 17 additions & 4 deletions samples-and-tests/just-test-cases/app/controllers/Application.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,18 @@ public static void some1() {

@Youhou
public static void some2() {
renderText(Invoker.InvocationContext.current());
String value = Invoker.InvocationContext.current().toString();
Logger.info("InvocationContext is '%s'", value);
renderText(value);
}

@Youhou
public static void some3() throws Exception {
JobWithContext job = new JobWithContext();
Future<String> future = job.now();
renderText(future.get());
String value = future.get();
Logger.info("InvocationContext is '%s'", value);
renderText(value);
}


Expand Down Expand Up @@ -159,8 +163,17 @@ public static void generateBookWithDateLink(long timeLong) {

public static void book(Date at) {
java.text.SimpleDateFormat df = new java.text.SimpleDateFormat("dd/MM/yy");
df.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));
renderText("Booked at %s !!", df.format(at));

// The below statement to set the timezone to UTC breaks the test if the default
// JVM time zone sees this date in daylight savings.
// e.g. for London/Europe the "at" is 5/4/61 00:00:00 BST and when formatted to UTC is
// adjusted back an hour to 4/4/61 23:00:00
// df.setTimeZone(TimeZone.getTimeZone("Etc/UTC"));

String value = String.format("Booked at %s !!", df.format(at));
Logger.info("Date '%s' formatted to '%s' with system default TimeZone '%s'", at, value, TimeZone.getDefault());

renderText(value);
}

public static void escapeData() {
Expand Down
62 changes: 31 additions & 31 deletions samples-and-tests/just-test-cases/conf/routes
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ GET /re/{<[a-z]+>re} Application.ok
GET /re/{<[0-9]{5}>re} Application.ok
GET /re/{<[A-Z]{2,4}>re} Application.ok
GET /re/{<[0-9]%2F[0-9]>re}/rev Application.revRoute
GET /re/{<[a-z0-9]+%2F[a-z,0-9]+>re}/rev Application.revRoute
GET /re/{<[A-Za-z0-9\/%]+>re}/rev Application.revRoute
GET /re/urlWithArgumentInRoutesNoSpace Application.ressourceWithoutSpecialCharacters(appId:'param1',verId:'param2')
GET /re/{<[a-z0-9]+%2F[a-z,0-9]+>re}/rev Application.revRoute
GET /re/{<[A-Za-z0-9\/%]+>re}/rev Application.revRoute
GET /re/urlWithArgumentInRoutesNoSpace Application.ressourceWithoutSpecialCharacters(appId:'param1',verId:'param2')
GET /re/urlWithArgumentInRoutesWithSpace Application.ressourceWithoutSpecialCharacters( appId:'param1', verId:'param2' )
GET /re/{appId}/{verId} Application.ressourceWithoutSpecialCharacters
GET /re/{<[a-z0-9]+[\/]??(%2F)??[a-z,0-9]+>appId}/{<[a-z0-9\/%F]+>verId} Application.ressourceWithSpecialCharacters
GET /re/{appId}/{verId} Application.ressourceWithoutSpecialCharacters
GET /re/{<[a-z0-9]+[\/]??(%2F)??[a-z,0-9]+>appId}/{<[a-z0-9\/%F]+>verId} Application.ressourceWithSpecialCharacters

GET /{lucky}/doIt Application.showIt
GET /withQueryParam Application.withQueryParam
Expand Down Expand Up @@ -50,44 +50,44 @@ POST /needAuthenticity WithAuthenticity.needAuthenticity
GET /needAuthenticity WithAuthenticity.needAuthenticity

# Import the default CRUD routes
* /admin module:crud
* /admin module:crud

# Map static resources from the /app/public folder to the /public path
GET /public/ staticDir:public
GET static.foo.com/assets/ staticDir:public2/assets1
GET static2.foo.com/x staticDir:public2/assets2
GET /public/ staticDir:public
GET static.foo.com/assets/ staticDir:public2/assets1
GET static2.foo.com/x staticDir:public2/assets2

#bug in router.reverse
GET /notmatch/{name}/{action} Application.{action}
GET /index2 Application.index2
GET /xsstest security.XssAttempts.testUrlParam
GET /notmatch/{name}/{action} Application.{action}
GET /index2 Application.index2
GET /xsstest security.XssAttempts.testUrlParam

# Catch all
* /async/{controller}/{action} async.{controller}.{action}
* /sample/{controller}/{action} sample.{controller}.{action}
* /tagDemos/{controller}/{action} tagDemos.{controller}.{action}
* /security/{controller}/{action} security.{controller}.{action}
* /{controller}/{action} {controller}.{action}
* /sample/{controller}/{action} sample.{controller}.{action}
* /tagDemos/{controller}/{action} tagDemos.{controller}.{action}
* /security/{controller}/{action} security.{controller}.{action}
* /{controller}/{action} {controller}.{action}

# Data binding

GET /databinding/showDefaultDateFormat/{date}/? DataBinding.showDefaultDateFormat
GET /databinding/showLocaleDateFormat/{date}/? DataBinding.showLocaleDateFormat
GET /databinding/showDefaultLocaleDateFormat/{date}/? DataBinding.showDefaultLocaleDateFormat
GET /databinding/showDateFormat/{date}/? DataBinding.showDateFormat
GET /databinding/showList/{<.*>mailboxes}/? DataBinding.showList
GET /databinding/showCalendar/{cal}/? DataBinding.showCalendar
GET /databinding/showCalendar2/{cal}/? DataBinding.showCalendar2
GET /databinding/changeLanguage/{lang}/? DataBinding.changeLanguage
GET /databinding/showDefaultDateFormat/{date}/? DataBinding.showDefaultDateFormat
GET /databinding/showLocaleDateFormat/{date}/? DataBinding.showLocaleDateFormat
GET /databinding/showDefaultLocaleDateFormat/{date}/? DataBinding.showDefaultLocaleDateFormat
GET /databinding/showDateFormat/{date}/? DataBinding.showDateFormat
GET /databinding/showList/{<.*>mailboxes}/? DataBinding.showList
GET /databinding/showCalendar/{cal}/? DataBinding.showCalendar
GET /databinding/showCalendar2/{cal}/? DataBinding.showCalendar2
GET /databinding/changeLanguage/{lang}/? DataBinding.changeLanguage


GET /useAwaitViaOtherClass WithContinuations.ControllerWithoutContinuations.useAwaitViaOtherClass
GET /useAwaitViaOtherClass WithContinuations.ControllerWithoutContinuations.useAwaitViaOtherClass

GET /status/ok/ StatusCodes.justOkay
GET /status/not-found/ StatusCodes.rendersNotFound
GET /status/unauthorized/ StatusCodes.rendersUnauthorized
POST /status/job/ StatusCodes.usesContinuation
GET /status/failure/ StatusCodes.throwsException
GET /status/ok/ StatusCodes.justOkay
GET /status/not-found/ StatusCodes.rendersNotFound
GET /status/unauthorized/ StatusCodes.rendersUnauthorized
POST /status/job/ StatusCodes.usesContinuation
GET /status/failure/ StatusCodes.throwsException

# module
* / module:secure
* / module:secure
2 changes: 1 addition & 1 deletion samples-and-tests/just-test-cases/test/binding.test.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<!-- Now unbind dates -->
open('/databinding/changeLanguage/en/')
<!-- Since it is unclear which locale is current when rendering this selenium page,
we cannot rely on the auto-date-unbinding when generating the url with patams here.
we cannot rely on the auto-date-unbinding when generating the url with params here.
To test the same stuff´, we therefor request a page from the server (which has the correct lang, en)
which generates the link we need, then we click it.
We end up testing the exact same stuff, only under known locale conditions. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,62 +22,62 @@
import play.test.FunctionalTest;
import play.test.UnitTest;


public class PropertiesEnhancerTest extends FunctionalTest {

@Test
public void testEnhancerMethods() throws Exception {
Project obj = new Project();
// get all of the properties for a POJO
PropertyDescriptor[] descriptors = PropertyUtils
.getPropertyDescriptors(obj);

assertEquals(10, descriptors.length);
@Test
public void testEnhancerMethods() throws Exception {
Project obj = new Project();
// get all of the properties for a POJO
PropertyDescriptor[] descriptors = PropertyUtils.getPropertyDescriptors(obj);

assertTrue(validAccessorFor(obj, descriptors, "class", true, false));
assertTrue(validAccessorFor(obj, descriptors, "companies", true, true));
assertTrue(validAccessorFor(obj, descriptors, "company", true, true));
assertTrue(validAccessorFor(obj, descriptors, "endDate", true, true));
assertTrue(validAccessorFor(obj, descriptors, "entityId", true, false));
assertTrue(validAccessorFor(obj, descriptors, "id", true, false));
assertTrue(validAccessorFor(obj, descriptors, "name", true, true));
assertTrue(validAccessorFor(obj, descriptors, "observation", true, true));
assertTrue(validAccessorFor(obj, descriptors, "startDate", true, true));
}
assertEquals(9, descriptors.length);

private boolean validAccessorFor(Object obj,
PropertyDescriptor[] descriptors, String name, boolean readMethod,
boolean writeMethod) {
// go through all values
for (int i = 0; i < descriptors.length; i++) {
PropertyDescriptor descriptor = descriptors[i];
if (descriptor.getName().equals(name)) {
if (readMethod) {
Method method = descriptor.getReadMethod();
if (method == null) {
return false;
}
}
// It appears the "class" attribute is no longer returned in BeanUtils v1.9.4. This property is only
// referenced in play.db.jpa.JPAModelLoader.makeCompositeKey(Model model) and it is specifically ignored
// so not required.
// assertTrue(validAccessorFor(obj, descriptors, "class", true, false));
assertTrue(validAccessorFor(obj, descriptors, "companies", true, true));
assertTrue(validAccessorFor(obj, descriptors, "company", true, true));
assertTrue(validAccessorFor(obj, descriptors, "endDate", true, true));
assertTrue(validAccessorFor(obj, descriptors, "entityId", true, false));
assertTrue(validAccessorFor(obj, descriptors, "id", true, false));
assertTrue(validAccessorFor(obj, descriptors, "name", true, true));
assertTrue(validAccessorFor(obj, descriptors, "observation", true, true));
assertTrue(validAccessorFor(obj, descriptors, "startDate", true, true));
}

if (writeMethod) {
Method method = descriptor.getWriteMethod();
if (method == null) {
return false;
}
private boolean validAccessorFor(Object obj, PropertyDescriptor[] descriptors, String name, boolean readMethod,
boolean writeMethod) {
// go through all values
for (int i = 0; i < descriptors.length; i++) {
PropertyDescriptor descriptor = descriptors[i];
if (descriptor.getName().equals(name)) {
if (readMethod) {
Method method = descriptor.getReadMethod();
if (method == null) {
return false;
}
}

if (writeMethod) {
Method method = descriptor.getWriteMethod();
if (method == null) {
return false;
}
}
return true;
}
}
return true;
}
return false;
}
return false;
}

@Test
public void testEnhancerProperty() throws Exception {
Project obj = new Project();
obj.name = "toto";
Object value = PropertyUtils.getProperty(obj, "name");
@Test
public void testEnhancerProperty() throws Exception {
Project obj = new Project();
obj.name = "toto";
Object value = PropertyUtils.getProperty(obj, "name");

assertNotNull(value);
assertEquals("toto", value);
}
assertNotNull(value);
assertEquals("toto", value);
}
}
8 changes: 4 additions & 4 deletions samples-and-tests/just-test-cases/test/errors.test.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#{selenium 'Test the errors pages'}

// 404
// 404
open('@{HasErrors.willBeNotFound()}')
assertTextPresent('Not found')
assertTextPresent('Hop')
Expand All @@ -22,11 +22,11 @@
// 404
open('/nimp')
assertTextPresent('Not found')
assertTextPresent('GET /nimp')
assertTextPresent('GET /nimp')

// 404
// 404
open('/application/nimp')
assertTextPresent('Not found')
assertTextPresent('application.nimp action not found')
assertTextPresent('application.nimp action not found')

#{/selenium}
Loading

0 comments on commit a481dd3

Please sign in to comment.