Selaa lähdekoodia

Make FW fully-Java 10 compatible

wip-java-10-compat
elmot 6 vuotta sitten
vanhempi
commit
fab27e537b

+ 1
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java Näytä tiedosto

@@ -15,7 +15,7 @@
*/
package com.vaadin.v7.data.fieldgroup;

import java.beans.IntrospectionException;
import com.googlecode.openbeans.IntrospectionException;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java Näytä tiedosto

@@ -16,8 +16,8 @@

package com.vaadin.v7.data.util;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collection;

+ 2
- 2
compatibility-server/src/test/java/com/vaadin/v7/data/util/PropertyDescriptorTest.java Näytä tiedosto

@@ -3,8 +3,8 @@ package com.vaadin.v7.data.util;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;

import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.Introspector;
import com.googlecode.openbeans.PropertyDescriptor;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInputStream;

+ 17
- 2
pom.xml Näytä tiedosto

@@ -78,6 +78,16 @@
</pluginRepositories>

<repositories>
<repository>
<id>redhat-ga</id>
<url>https://maven.repository.redhat.com/ga/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>https://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
@@ -116,6 +126,11 @@
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.googlecode</groupId>
<artifactId>openbeans</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
@@ -219,7 +234,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.2.0.Final</version>
<version>4.3.2.Final</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
@@ -229,7 +244,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<version>2.18.3</version>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>

+ 5
- 0
server/pom.xml Näytä tiedosto

@@ -47,6 +47,11 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>com.googlecode</groupId>
<artifactId>openbeans</artifactId>
</dependency>

<!-- Bean Validation API -->
<dependency>
<groupId>javax.validation</groupId>

+ 1
- 1
server/src/main/java/com/vaadin/data/AbstractBeanPropertyDefinition.java Näytä tiedosto

@@ -15,7 +15,7 @@
*/
package com.vaadin.data;

import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.PropertyDescriptor;

import com.vaadin.shared.util.SharedUtil;
import com.vaadin.util.ReflectTools;

+ 2
- 2
server/src/main/java/com/vaadin/data/BeanPropertySet.java Näytä tiedosto

@@ -15,8 +15,8 @@
*/
package com.vaadin.data;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.PropertyDescriptor;
import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;

+ 4
- 4
server/src/main/java/com/vaadin/data/util/BeanUtil.java Näytä tiedosto

@@ -15,10 +15,10 @@
*/
package com.vaadin.data.util;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.BeanInfo;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.Introspector;
import com.googlecode.openbeans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

+ 3
- 3
server/src/main/java/com/vaadin/server/JsonCodec.java Näytä tiedosto

@@ -16,9 +16,9 @@

package com.vaadin.server;

import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.Introspector;
import com.googlecode.openbeans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.Array;
import java.lang.reflect.Field;

+ 5
- 4
server/src/main/java/com/vaadin/ui/ComponentRootSetter.java Näytä tiedosto

@@ -52,7 +52,8 @@ public class ComponentRootSetter implements Serializable {
}

/**
* Checks if the given custom component or composite may accept a root component.
* Checks if the given custom component or composite may accept a root
* component.
* <p>
* For internal use only.
*
@@ -63,11 +64,11 @@ public class ComponentRootSetter implements Serializable {
*
*/
public static boolean canSetRoot(Component customComponent) {
if(customComponent instanceof CustomComponent) {
if (customComponent instanceof CustomComponent) {
return true;
}
if(customComponent instanceof Composite) {
return ((Composite)customComponent).getCompositionRoot() == null;
if (customComponent instanceof Composite) {
return ((Composite) customComponent).getCompositionRoot() == null;
}
return false;
}

+ 1
- 1
server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java Näytä tiedosto

@@ -209,4 +209,4 @@ public class ColorPickerPreview extends CssLayout implements HasValue<Color> {
.concat("' is not in any recognized format");
}

}
}

+ 4
- 4
server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java Näytä tiedosto

@@ -15,10 +15,10 @@
*/
package com.vaadin.ui.declarative;

import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.BeanInfo;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.Introspector;
import com.googlecode.openbeans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.lang.reflect.Type;

+ 2
- 2
server/src/main/java/com/vaadin/util/ReflectTools.java Näytä tiedosto

@@ -15,8 +15,8 @@
*/
package com.vaadin.util;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.IntrospectionException;
import com.googlecode.openbeans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;

+ 3
- 3
server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java Näytä tiedosto

@@ -1,8 +1,8 @@
package com.vaadin.tests.design;

import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import com.googlecode.openbeans.BeanInfo;
import com.googlecode.openbeans.Introspector;
import com.googlecode.openbeans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;

+ 5
- 3
uitest/src/main/java/com/vaadin/tests/performance/AbstractBeansMemoryTest.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.vaadin.tests.performance;

import java.lang.instrument.Instrumentation;
import java.lang.reflect.Field;
import java.math.BigDecimal;
import java.util.Collections;
@@ -24,7 +25,7 @@ import com.vaadin.ui.MenuBar.MenuItem;
import com.vaadin.ui.UI;
import com.vaadin.ui.VerticalLayout;

import jdk.nashorn.internal.ir.debug.ObjectSizeCalculator;
//import jdk.nashorn.internal.ir.debug.ObjectSizeCalculator;

/**
* @author Vaadin Ltd
@@ -140,8 +141,9 @@ public abstract class AbstractBeansMemoryTest<T extends AbstractComponent>

HasComponents container = component.getParent();
setParent(component, null);
memoryLabel.setValue(
String.valueOf(ObjectSizeCalculator.getObjectSize(component)));
// todo enable back
// memoryLabel.setValue(
// String.valueOf(Instrumentation.getObjectSize(component)));

setParent(component, container);
}

Loading…
Peruuta
Tallenna