]> source.dussan.org Git - vaadin-framework.git/commitdiff
Make FW fully-Java 10 compatible wip-java-10-compat
authorelmot <elmotelmot.vaadin.com>
Thu, 3 May 2018 08:24:56 +0000 (11:24 +0300)
committerelmot <elmotelmot.vaadin.com>
Thu, 3 May 2018 08:24:56 +0000 (11:24 +0300)
15 files changed:
compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java
compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java
compatibility-server/src/test/java/com/vaadin/v7/data/util/PropertyDescriptorTest.java
pom.xml
server/pom.xml
server/src/main/java/com/vaadin/data/AbstractBeanPropertyDefinition.java
server/src/main/java/com/vaadin/data/BeanPropertySet.java
server/src/main/java/com/vaadin/data/util/BeanUtil.java
server/src/main/java/com/vaadin/server/JsonCodec.java
server/src/main/java/com/vaadin/ui/ComponentRootSetter.java
server/src/main/java/com/vaadin/ui/components/colorpicker/ColorPickerPreview.java
server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
server/src/main/java/com/vaadin/util/ReflectTools.java
server/src/test/java/com/vaadin/tests/design/DeclarativeTestBase.java
uitest/src/main/java/com/vaadin/tests/performance/AbstractBeansMemoryTest.java

index 901349d42aad4d5f5d34c81a0a60a41dace90b2c..5329ae67fe9fcb25c042215d5eab3da9cf51ea1e 100644 (file)
@@ -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;
index d9a3a40a39dce0096e1dec0afeee5cc8f1074062..a0ba2dbb111945f56c0d9b476b9b2014160664e1 100644 (file)
@@ -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;
index 19147fdef4a7cffb54bb1bde62ed6fd89b3c03f4..ba9bf91b861f5120412faa88e6d1eddf99b08922 100644 (file)
@@ -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;
diff --git a/pom.xml b/pom.xml
index 93c01248b8148aa73d707e601246a1b250a45e44..14fe5498d2c09415b568288d9be7bacc75fcad88 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     </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>
                 <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>
             <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>
             <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>
index 846a21cf54d000d852dcf92feac04a772e1721f4..77fbc8d4bc642cf98e8292835d760181c75e73d2 100644 (file)
             <scope>provided</scope>
         </dependency>
 
+        <dependency>
+            <groupId>com.googlecode</groupId>
+            <artifactId>openbeans</artifactId>
+        </dependency>
+
         <!-- Bean Validation API -->
         <dependency>
             <groupId>javax.validation</groupId>
index adb543ec31551bee65723fa6de43886f9d0a208a..809c1f4d7ad240e76693d768d6277d3f7b3281a3 100644 (file)
@@ -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;
index 90c264eaa1f7006da75d34c5df433cd88347d536..da305d4c57672cfbbc2d5ba76b8efc8773e01e63 100644 (file)
@@ -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;
index ac59586d1bc3e40b762b7f9b1dd9590754094239..8f4134e6e8dab2286efdbf717fe687d13a8d7508 100644 (file)
  */
 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;
index eeb27b0e5a27af54472ef02ca3da2b177565400b..545f2af0871f1f8305dda44d5f02c75028b8e5f6 100644 (file)
@@ -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;
index fe0a8e6a884e6fa8171d1e434a2ed397e8b2f124..92116e49df0261a3cdd80b98d3991a66bd0dd7c5 100644 (file)
@@ -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;
     }
index 8c7af4273a0166fb07dfdd8de3abc4453da95482..ea593041ab174dcd26aecb96f127a60c060cf5a7 100644 (file)
@@ -209,4 +209,4 @@ public class ColorPickerPreview extends CssLayout implements HasValue<Color> {
                         .concat("' is not in any recognized format");
     }
 
-}
\ No newline at end of file
+}
index 21bef12317043d122906cdd5ace46d792ec02842..759faf4038db4b862e40bab736775983e0b946c7 100644 (file)
  */
 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;
index 245b864169f72939b85e67fa7d1c177f46f193ac..340a060fd02bb6b69aee422931feba1d1f83331c 100644 (file)
@@ -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;
index 07d9f9f9f5bbc7a738148864a1fbde999dd25b84..e2da2cd3cf61c4ab4ddec83105b20c6f22061501 100644 (file)
@@ -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;
index c4d2b4d1955ecc83fad6ab5d0f17225e657e9c7b..f56f5cd8470df76ff341bb7118eac6fda64184c4 100644 (file)
@@ -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);
     }