-
Notifications
You must be signed in to change notification settings - Fork 160
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
Update branch #9665
Update branch #9665
Conversation
Lock the registry when registering dynamic route in serviceInit to not have a race where 2 inits note that path is not registered and then try to register the route. Fixes #9223
8d012f7 removed some log and converted others into debug but log in disconnectedCallback was left.
Exposes DataCommunicator::getDataProviderSize to the components, in order to get the items count taking into account the countCallback, if it has been set previously. Related-to: vaadin/flow-components#282
Fix typo in DataCommunicator::getDataProviderSize() javadoc.
* feat: Create Flow plugins for webpack Moved stats file handling to a custom plugin. Added feature for copying custom Flow plugins for use with webpack. Fixes #9283
AppShellConfigurator is now also considered when scanning for annotations and deciding theme. Fixes #9110
Having the `@Theme` annotation on Flow views or router layouts will not be allowed anymore, it should be on `AppShellConfigurator` instead. Fixes #9092
- Use tree-shakeable ES imports for TS form validators based on the latest version of validators lib. - Add missing `return` in the `submit()` method
Add a string definition for theme that matches the "application theme" in the theme folder inside /frontend/theme/, loading the css automatically from there. This is based on Lumo theme, always. Change old class based theme to use themeClass for theme selection. Fixes #9281
In-memory filtering and sorting are now stored directly in component, which gives an opportunity to change it through the data view API for a certain component separately from other components bound to the same data provider. Fixes #8655
This module is subsumed by test-router-custom-context.
Theme Class and Theme Name is not supported in the same Theme annotation as theme name builds on the Lumo theme. test-themes is now for testing the Application theme only. Old theme test was moved into test-misc. Fixes #9370
In-memory filtering and sorting are now stored directly in component, which gives an opportunity to change it through the data view API for a certain component separately from other components bound to the same data provider. Fixes: #8655
Now we only handle the theme with the name inside the Theme annotation. Fixes #9383
Read token file as a bundle resource in OSGi Fixes #9146 Fix NPE Revert logic back to the previous state # Conflicts: # flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java # flow-server/src/main/java/com/vaadin/flow/server/frontend/FrontendUtils.java # flow-server/src/main/java/com/vaadin/flow/server/osgi/OSGiAccess.java
Fixes #9185 Exclude non-serializable classes Drop dependency to flow-push from flow-server # Conflicts: # flow-server/src/main/java/com/vaadin/flow/server/BootstrapHandler.java # flow-server/src/main/java/com/vaadin/flow/server/DeploymentConfigurationFactory.java # flow-server/src/main/resources/META-INF/services/javax.servlet.ServletContainerInitializer # flow-server/src/test/java/com/vaadin/flow/server/connect/generator/endpoints/model/OSGiInstantiatorFactory.java # flow-server/src/test/java/com/vaadin/flow/server/connect/generator/endpoints/model/OSGiResourceProvider.java # flow-server/src/test/java/com/vaadin/flow/server/connect/typeconversion/StringConversionTest.java
# Conflicts: # flow-push/pom.xml # flow-server/src/main/java/com/vaadin/flow/server/osgi/VaadinBundleTracker.java
theme = getFinder().loadClass(themeClass); | ||
} else { | ||
theme = getDefaultTheme(); | ||
if (theme == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initStandardLookup(classSet, servletContext); | ||
|
||
DeferredServletContextInitializers initializers; | ||
synchronized (servletContext) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* | ||
*/ | ||
@HandlesTypes({ ResourceProvider.class, InstantiatorFactory.class, | ||
DeprecatedPolymerPublishedEventHandler.class, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @see #DEFAULT_FLOW_RESOURCES_FOLDER | ||
*/ | ||
@Deprecated | ||
public static final String DEAULT_FLOW_RESOURCES_FOLDER = | ||
DEFAULT_FLOW_RESOURCES_FOLDER; | ||
public static final String DEAULT_FLOW_RESOURCES_FOLDER = DEFAULT_FLOW_RESOURCES_FOLDER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getLogger().error("Failed to start the webpack process", e); | ||
} catch (InterruptedException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ClassLoader webClassLoader = ctx.getClassLoader(); | ||
ClassLoader classLoader = getClass().getClassLoader(); | ||
// see DeferredServletContextIntializers | ||
DeferredServletContextInitializers.Initializer deferredInitializer = ctx -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else { | ||
/* | ||
* The classloader which has loaded this class ({@code | ||
* classLoader}) should be either the {@code webClassLoader} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeferredServletContextInitializers initializers = vaadinContext | ||
.getAttribute( | ||
DeferredServletContextInitializers.class, | ||
() -> new DeferredServletContextInitializers()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DeferredServletContextInitializers.class, | ||
() -> new DeferredServletContextInitializers()); | ||
initializers.addInitializer( | ||
ctx -> deferredInitializer.init(ctx)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (requiresLookup()) { | ||
VaadinServletContext vaadinContext = new VaadinServletContext( | ||
context); | ||
synchronized (context) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DevModeInitializer devModeInitializer = new DevModeInitializer(); | ||
devModeInitializer.onStartup(classes, servletContext); | ||
waitForDevModeServer(); | ||
Thread.sleep(200); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* the token file data | ||
* @return the config parameters | ||
*/ | ||
public Map<String, String> getConfigParametersUsingTokenData( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
private static String getTokenFileContents(Properties initParameters) { | ||
private static String getTokenFileContents(Class<?> systemPropertyBaseClass, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
// Read the json and set the appropriate system properties if not | ||
// already set. | ||
if (json != null) { | ||
JsonObject buildInfo = JsonUtil.parse(json); | ||
setInitParametersUsingTokenData(initParameters, buildInfo); | ||
// TODO : will be rewritten properly without extra instantiation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -146,6 +133,7 @@ protected static Properties createInitParameters( | |||
readUiFromEnclosingClass(systemPropertyBaseClass, initParameters); | |||
readConfigurationAnnotation(systemPropertyBaseClass, initParameters); | |||
|
|||
// TODO : will be removed in futher commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
DevModeHandler.start(config, builder.npmFolder, runNodeTasks); | ||
// Check whether executor is provided by the caller (framework) | ||
Executor service = lookup.lookup(Executor.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
private ResourceProvider getResourceProvider(BootstrapContext context) { | ||
ResourceProvider resourceProvider = context.getSession() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
@Override | ||
public <U> U lookup(Class<U> serviceClass) { | ||
if (services.contains(serviceClass)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while (rangeMatcher.find()) { | ||
final long start = Long.parseLong(rangeMatcher.group(1)); | ||
final long end = Long.parseLong(rangeMatcher.group(2)); | ||
Stack<Pair<Long, Long>> ranges = new Stack<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (end < start | ||
|| (resourceLength >= 0 && start >= resourceLength)) { | ||
// illegal range -> 416 | ||
getLogger().info("received an illegal range '{}' for resource '{}'", | ||
rangeMatcher.group(), resourceURL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (startGroup.isEmpty() && endGroup.isEmpty()) { | ||
response.setContentLengthLong(0L); | ||
response.setStatus(416); // Range Not Satisfiable | ||
getLogger().info("received a malformed range: '{}'", rangeMatcher.group()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -125,51 +126,54 @@ | |||
*/ | |||
private URI nodeDownloadRoot = URI.create(NodeInstaller.DEFAULT_NODEJS_DOWNLOAD_ROOT); | |||
|
|||
private Lookup lookup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
VaadinContext context = ui.get().getSession().getService() | ||
.getContext(); | ||
DeprecatedPolymerPublishedEventHandler handler = context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.getContext(); | ||
DeprecatedPolymerPublishedEventHandler handler = context | ||
.getAttribute(Lookup.class) | ||
.lookup(DeprecatedPolymerPublishedEventHandler.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -180,14 +182,16 @@ private static void invokeMethod(Component instance, Method method, | |||
Serializable returnValue = (Serializable) invokeMethod(instance, | |||
method, args); | |||
|
|||
instance.getElement().executeJs("this.$server['" | |||
instance.getElement() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -107,13 +110,12 @@ public String getRpcType() { | |||
PolymerServerEventHandlers eventHandlers = node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instance.getElement().executeJs("this.$server['" | ||
+ JsonConstants.RPC_PROMISE_CALLBACK_NAME | ||
+ "']($0, false)", Integer.valueOf(promiseId)); | ||
instance.getElement() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -107,13 +110,12 @@ public String getRpcType() { | |||
PolymerServerEventHandlers eventHandlers = node | |||
.getFeature(PolymerServerEventHandlers.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SonarQube analysis reported 84 issues Watch the comments in this conversation to review them. Top 10 extra issuesNote: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:
|
No description provided.