@@ -229,33 +229,37 @@ public final class BeanUtil implements Serializable { | |||
} | |||
/** | |||
* Checks if the object is serializable or not. To be used in assertion checks only, | |||
* since the check might be a bit heavyweight. | |||
* Checks if the object is serializable or not. To be used in assertion | |||
* checks only, since the check might be a bit heavyweight. | |||
* | |||
* @param obj to be checked | |||
* @param obj | |||
* to be checked | |||
* @return {@code true} | |||
* @throws AssertionError if the object is not serializable | |||
* @throws AssertionError | |||
* if the object is not serializable | |||
*/ | |||
public static boolean checkSerialization(Object obj) { | |||
try { | |||
ObjectOutputStream dummyObjectOutputStream = new ObjectOutputStream(new OutputStream() { | |||
@Override | |||
public void write(int b) { | |||
} | |||
ObjectOutputStream dummyObjectOutputStream = new ObjectOutputStream( | |||
new OutputStream() { | |||
@Override | |||
public void write(int b) { | |||
} | |||
@SuppressWarnings("NullableProblems") | |||
@Override | |||
public void write(byte[] ignored) { | |||
} | |||
@SuppressWarnings("NullableProblems") | |||
@Override | |||
public void write(byte[] ignored) { | |||
} | |||
@SuppressWarnings("NullableProblems") | |||
@Override | |||
public void write(byte[] b, int off, int len) { | |||
} | |||
}); | |||
@SuppressWarnings("NullableProblems") | |||
@Override | |||
public void write(byte[] b, int off, int len) { | |||
} | |||
}); | |||
dummyObjectOutputStream.writeObject(obj); | |||
} catch (Throwable e) { | |||
throw new AssertionError("Formatter supplier should be serializable", e); | |||
throw new AssertionError( | |||
"Formatter supplier should be serializable", e); | |||
} | |||
return true; | |||
} |
@@ -1430,6 +1430,7 @@ public class VaadinServlet extends HttpServlet implements Constants { | |||
/* | |||
* (non-Javadoc) | |||
* | |||
* @see javax.servlet.GenericServlet#destroy() | |||
*/ | |||
@Override |
@@ -1118,7 +1118,7 @@ public class Upload extends AbstractComponent | |||
fireUploadSuccess(event.getFileName(), event.getMimeType(), | |||
event.getContentLength()); | |||
endUpload(); | |||
if(lastStartedEvent != null) | |||
if (lastStartedEvent != null) | |||
lastStartedEvent.disposeStreamVariable(); | |||
} | |||
@@ -1138,7 +1138,7 @@ public class Upload extends AbstractComponent | |||
} | |||
} finally { | |||
endUpload(); | |||
if(lastStartedEvent != null) | |||
if (lastStartedEvent != null) | |||
lastStartedEvent.disposeStreamVariable(); | |||
} | |||
} |
@@ -103,7 +103,7 @@ public class ClassesSerializableTest { | |||
"com\\.vaadin\\.screenshotbrowser\\.ScreenshotBrowser.*", // | |||
"com\\.vaadin\\.osgi.*", // | |||
"com\\.vaadin\\.server\\.osgi.*", | |||
//V7 | |||
// V7 | |||
"com\\.vaadin\\.v7\\.ui\\.themes\\.BaseTheme", | |||
"com\\.vaadin\\.v7\\.ui\\.themes\\.ChameleonTheme", | |||
"com\\.vaadin\\.v7\\.ui\\.themes\\.Reindeer", | |||
@@ -113,8 +113,7 @@ public class ClassesSerializableTest { | |||
"com\\.vaadin\\.v7\\.data\\.util.BeanItemContainerGenerator.*", | |||
"com\\.vaadin\\.v7\\.data\\.util\\.sqlcontainer\\.connection\\.MockInitialContextFactory", | |||
"com\\.vaadin\\.v7\\.data\\.util\\.sqlcontainer\\.DataGenerator", | |||
"com\\.vaadin\\.v7\\.data\\.util\\.sqlcontainer\\.FreeformQueryUtil", | |||
}; | |||
"com\\.vaadin\\.v7\\.data\\.util\\.sqlcontainer\\.FreeformQueryUtil", }; | |||
/** | |||
* Tests that all the relevant classes and interfaces under |
@@ -30,7 +30,7 @@ public class AbstractListingTest { | |||
/** | |||
* Used to execute data generation | |||
* | |||
* | |||
* @param initial | |||
* {@code true} to mock initial data request; {@code false} | |||
* for follow-up request. |
@@ -30,7 +30,8 @@ public class DateFieldUnparsableDateString extends AbstractTestUI { | |||
protected Result<LocalDate> handleUnparsableDateString( | |||
String dateString) { | |||
try { | |||
String parseableString = dateString == null ? "" : dateString.replaceAll(" ", ""); | |||
String parseableString = dateString == null ? "" | |||
: dateString.replaceAll(" ", ""); | |||
if (parseableString.length() % 2 == 1) { | |||
parseableString = "0" + parseableString; | |||
} |
@@ -1193,7 +1193,7 @@ public abstract class AbstractTB3Test extends ParallelTest { | |||
* {@link Actions#moveToElement(WebElement, int, int)}. This method takes | |||
* into account the W3C specification in browsers that properly implement | |||
* it. | |||
* | |||
* | |||
* @param element | |||
* the element | |||
* @param targetX | |||
@@ -1214,7 +1214,7 @@ public abstract class AbstractTB3Test extends ParallelTest { | |||
* {@link Actions#moveToElement(WebElement, int, int)}. This method takes | |||
* into account the W3C specification in browsers that properly implement | |||
* it. | |||
* | |||
* | |||
* @param element | |||
* the element | |||
* @param targetY |