Browse Source

Use simple class names

tags/8.2.0.alpha2
Ahmed Ashour 6 years ago
parent
commit
d1520204ea
41 changed files with 136 additions and 112 deletions
  1. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java
  2. 1
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java
  3. 8
    6
      compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java
  4. 4
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java
  5. 5
    3
      compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java
  6. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheFlushNotifier.java
  7. 4
    2
      compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java
  8. 2
    1
      compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java
  9. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/event/ItemClickEvent.java
  10. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java
  11. 4
    4
      compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java
  12. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java
  13. 8
    8
      compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java
  14. 4
    3
      compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java
  15. 3
    3
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicBackwardHandler.java
  16. 3
    3
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicForwardHandler.java
  17. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGradient.java
  18. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java
  19. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerHistory.java
  20. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java
  21. 2
    2
      compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java
  22. 3
    1
      compatibility-server/src/test/java/com/vaadin/v7/data/util/sqlcontainer/connection/MockInitialContextFactory.java
  23. 1
    1
      compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/Color.java
  24. 27
    24
      server/src/main/java/com/vaadin/event/ListenerMethod.java
  25. 2
    2
      server/src/main/java/com/vaadin/event/MethodEventSource.java
  26. 1
    1
      server/src/main/java/com/vaadin/server/LocaleService.java
  27. 1
    1
      server/src/main/java/com/vaadin/server/PaintTarget.java
  28. 4
    2
      server/src/main/java/com/vaadin/ui/ConnectorTracker.java
  29. 2
    2
      server/src/main/java/com/vaadin/ui/GridLayout.java
  30. 4
    4
      server/src/main/java/com/vaadin/ui/PopupView.java
  31. 2
    2
      server/src/main/java/com/vaadin/ui/TabSheet.java
  32. 2
    2
      server/src/main/java/com/vaadin/ui/Upload.java
  33. 4
    4
      server/src/main/java/com/vaadin/ui/Window.java
  34. 4
    3
      server/src/main/java/com/vaadin/util/ReflectTools.java
  35. 4
    2
      server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java
  36. 3
    1
      server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java
  37. 1
    1
      shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java
  38. 1
    1
      uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java
  39. 1
    1
      uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java
  40. 2
    2
      uitest/src/main/java/com/vaadin/tests/components/table/MissingScrollbar.java
  41. 1
    1
      uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItem.java View File

@@ -16,6 +16,7 @@

package com.vaadin.v7.data.util;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.Arrays;
@@ -212,7 +213,7 @@ public class BeanItem<BT> extends PropertysetItem {
pdMap.put(pd.getName(), vaadinPropertyDescriptor);
}
}
} catch (final java.beans.IntrospectionException ignored) {
} catch (final IntrospectionException ignored) {
}

return pdMap;

+ 1
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/DefaultItemSorter.java View File

@@ -50,7 +50,7 @@ import com.vaadin.v7.data.Property;
@Deprecated
public class DefaultItemSorter implements ItemSorter {

private java.lang.Object[] sortPropertyIds;
private Object[] sortPropertyIds;
private boolean[] sortDirections;
private Container container;
private Comparator<Object> propertyValueComparator;

+ 8
- 6
compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodProperty.java View File

@@ -19,6 +19,8 @@ package com.vaadin.v7.data.util;
import static com.vaadin.util.ReflectTools.convertPrimitiveType;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
@@ -100,7 +102,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
private static final Object[] DEFAULT_SET_ARGS = new Object[1];

/* Special serialization to handle method references */
private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
out.defaultWriteObject();
SerializerHelper.writeClass(out, type);
@@ -126,7 +128,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
}

/* Special serialization to handle method references */
private void readObject(java.io.ObjectInputStream in)
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
@@ -203,7 +205,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
getMethod = null;
try {
getMethod = initGetterMethod(beanPropertyName, beanClass);
} catch (final java.lang.NoSuchMethodException ignored) {
} catch (final NoSuchMethodException ignored) {
throw new MethodException(this,
"Bean property " + beanPropertyName + " can not be found");
}
@@ -216,7 +218,7 @@ public class MethodProperty<T> extends AbstractProperty<T> {
try {
setMethod = beanClass.getMethod("set" + beanPropertyName,
new Class[] { returnType });
} catch (final java.lang.NoSuchMethodException skipped) {
} catch (final NoSuchMethodException skipped) {
}

// Gets the return type from get method
@@ -545,11 +547,11 @@ public class MethodProperty<T> extends AbstractProperty<T> {
try {
getMethod = beanClass.getMethod("get" + propertyName,
new Class[] {});
} catch (final java.lang.NoSuchMethodException ignored) {
} catch (final NoSuchMethodException ignored) {
try {
getMethod = beanClass.getMethod("is" + propertyName,
new Class[] {});
} catch (final java.lang.NoSuchMethodException ignoredAsWell) {
} catch (final NoSuchMethodException ignoredAsWell) {
getMethod = beanClass.getMethod("are" + propertyName,
new Class[] {});
}

+ 4
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/MethodPropertyDescriptor.java View File

@@ -16,6 +16,8 @@
package com.vaadin.v7.data.util;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.Method;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -67,7 +69,7 @@ public class MethodPropertyDescriptor<BT>
}

/* Special serialization to handle method references */
private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
out.defaultWriteObject();
SerializerHelper.writeClass(out, propertyType);
@@ -96,7 +98,7 @@ public class MethodPropertyDescriptor<BT>
}

/* Special serialization to handle method references */
private void readObject(java.io.ObjectInputStream in)
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {

+ 5
- 3
compatibility-server/src/main/java/com/vaadin/v7/data/util/NestedMethodProperty.java View File

@@ -18,6 +18,8 @@ package com.vaadin.v7.data.util;
import static com.vaadin.util.ReflectTools.convertPrimitiveType;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
@@ -68,7 +70,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
private Class<? extends T> type;

/* Special serialization to handle method references */
private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
out.defaultWriteObject();
// getMethods and setMethod are reconstructed on read based on
@@ -76,7 +78,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
}

/* Special serialization to handle method references */
private void readObject(java.io.ObjectInputStream in)
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();

@@ -152,7 +154,7 @@ public class NestedMethodProperty<T> extends AbstractProperty<T> {
simplePropertyName, propertyClass);
propertyClass = getter.getReturnType();
getMethods.add(getter);
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
throw new IllegalArgumentException("Bean property '"
+ simplePropertyName + "' not found", e);
}

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/CacheFlushNotifier.java View File

@@ -16,6 +16,7 @@
package com.vaadin.v7.data.util.sqlcontainer;

import java.io.Serializable;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -55,7 +56,7 @@ class CacheFlushNotifier implements Serializable {
* Removes dead references from instance list
*/
private static void removeDeadReferences() {
java.lang.ref.Reference<? extends SQLContainer> dead = deadInstances
Reference<? extends SQLContainer> dead = deadInstances
.poll();
while (dead != null) {
allInstances.remove(dead);

+ 4
- 2
compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/SQLContainer.java View File

@@ -16,6 +16,8 @@
package com.vaadin.v7.data.util.sqlcontainer;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
@@ -1682,12 +1684,12 @@ public class SQLContainer implements Container, Container.Filterable,
return refdCont.getItem(getReferencedItemId(itemId, refdCont));
}

private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
out.defaultWriteObject();
}

private void readObject(java.io.ObjectInputStream in)
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
if (notificationsEnabled) {

+ 2
- 1
compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/connection/SimpleJDBCConnectionPool.java View File

@@ -16,6 +16,7 @@
package com.vaadin.v7.data.util.sqlcontainer.connection;

import java.io.IOException;
import java.io.ObjectOutputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
@@ -175,7 +176,7 @@ public class SimpleJDBCConnectionPool implements JDBCConnectionPool {

}

private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
initialized = false;
out.defaultWriteObject();

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/event/ItemClickEvent.java View File

@@ -87,9 +87,9 @@ public class ItemClickEvent extends ClickEvent implements Serializable {
try {
ITEM_CLICK_METHOD = ItemClickListener.class.getDeclaredMethod(
"itemClick", new Class[] { ItemClickEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException();
throw new RuntimeException();
}
}


+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractColorPicker.java View File

@@ -49,9 +49,9 @@ public abstract class AbstractColorPicker extends AbstractLegacyComponent
try {
COLOR_CHANGE_METHOD = ColorChangeListener.class.getDeclaredMethod(
"colorChanged", new Class[] { ColorChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in ColorPicker");
}
}

+ 4
- 4
compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java View File

@@ -1077,9 +1077,9 @@ public abstract class AbstractField<T> extends AbstractLegacyComponent
VALUE_CHANGE_METHOD = Property.ValueChangeListener.class
.getDeclaredMethod("valueChange",
new Class[] { Property.ValueChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in AbstractField");
}
}
@@ -1150,9 +1150,9 @@ public abstract class AbstractField<T> extends AbstractLegacyComponent
READ_ONLY_STATUS_CHANGE_METHOD = Property.ReadOnlyStatusChangeListener.class
.getDeclaredMethod("readOnlyStatusChange", new Class[] {
Property.ReadOnlyStatusChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in AbstractField");
}
}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/Label.java View File

@@ -321,9 +321,9 @@ public class Label extends AbstractLegacyComponent implements Property<String>,
VALUE_CHANGE_METHOD = Property.ValueChangeListener.class
.getDeclaredMethod("valueChange",
new Class[] { Property.ValueChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in Label");
}
}

+ 8
- 8
compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java View File

@@ -5327,9 +5327,9 @@ public class Table extends AbstractSelect implements Action.Container,
HEADER_CLICK_METHOD = HeaderClickListener.class
.getDeclaredMethod("headerClick",
new Class[] { HeaderClickEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(e);
throw new RuntimeException(e);
}
}

@@ -5368,9 +5368,9 @@ public class Table extends AbstractSelect implements Action.Container,
FOOTER_CLICK_METHOD = FooterClickListener.class
.getDeclaredMethod("footerClick",
new Class[] { FooterClickEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(e);
throw new RuntimeException(e);
}
}

@@ -5600,9 +5600,9 @@ public class Table extends AbstractSelect implements Action.Container,
COLUMN_RESIZE_METHOD = ColumnResizeListener.class
.getDeclaredMethod("columnResize",
new Class[] { ColumnResizeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(e);
throw new RuntimeException(e);
}
}

@@ -5729,9 +5729,9 @@ public class Table extends AbstractSelect implements Action.Container,
METHOD = ColumnReorderListener.class.getDeclaredMethod(
"columnReorder",
new Class[] { ColumnReorderEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(e);
throw new RuntimeException(e);
}
}


+ 4
- 3
compatibility-server/src/main/java/com/vaadin/v7/ui/Upload.java View File

@@ -18,6 +18,7 @@ package com.vaadin.v7.ui;
import java.io.OutputStream;
import java.io.Serializable;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.LinkedHashSet;
@@ -242,9 +243,9 @@ public class Upload extends AbstractLegacyComponent
"uploadStarted", new Class[] { StartedEvent.class });
UPLOAD_SUCCEEDED_METHOD = SucceededListener.class.getDeclaredMethod(
"uploadSucceeded", new Class[] { SucceededEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in Upload");
}
}
@@ -1201,7 +1202,7 @@ public class Upload extends AbstractLegacyComponent
}

@Override
public java.util.Collection<?> getListeners(java.lang.Class<?> eventType) {
public Collection<?> getListeners(Class<?> eventType) {
if (StreamingProgressEvent.class.isAssignableFrom(eventType)) {
if (progressListeners == null) {
return Collections.EMPTY_LIST;

+ 3
- 3
compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicBackwardHandler.java View File

@@ -55,11 +55,11 @@ public class BasicBackwardHandler implements BackwardHandler {
// set new start and end times
Calendar javaCalendar = event.getComponent().getInternalCalendar();
javaCalendar.setTime(start);
javaCalendar.add(java.util.Calendar.DATE, durationInDays);
javaCalendar.add(Calendar.DATE, durationInDays);
Date newStart = javaCalendar.getTime();

javaCalendar.setTime(end);
javaCalendar.add(java.util.Calendar.DATE, durationInDays);
javaCalendar.add(Calendar.DATE, durationInDays);
Date newEnd = javaCalendar.getTime();

if (start.equals(end)) { // day view
@@ -69,7 +69,7 @@ public class BasicBackwardHandler implements BackwardHandler {

// we suppose that 7 >= lastDay >= firstDay >= 1
while (!(firstDay <= dayOfWeek && dayOfWeek <= lastDay)) {
javaCalendar.add(java.util.Calendar.DATE, -1);
javaCalendar.add(Calendar.DATE, -1);
dayOfWeek = javaCalendar.get(Calendar.DAY_OF_WEEK);
}


+ 3
- 3
compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/handler/BasicForwardHandler.java View File

@@ -53,11 +53,11 @@ public class BasicForwardHandler implements ForwardHandler {
// set new start and end times
Calendar javaCalendar = Calendar.getInstance();
javaCalendar.setTime(start);
javaCalendar.add(java.util.Calendar.DATE, durationInDays);
javaCalendar.add(Calendar.DATE, durationInDays);
Date newStart = javaCalendar.getTime();

javaCalendar.setTime(end);
javaCalendar.add(java.util.Calendar.DATE, durationInDays);
javaCalendar.add(Calendar.DATE, durationInDays);
Date newEnd = javaCalendar.getTime();

if (start.equals(end)) { // day view
@@ -67,7 +67,7 @@ public class BasicForwardHandler implements ForwardHandler {

// we suppose that 7 >= lastDay >= firstDay >= 1
while (!(firstDay <= dayOfWeek && dayOfWeek <= lastDay)) {
javaCalendar.add(java.util.Calendar.DATE, 1);
javaCalendar.add(Calendar.DATE, 1);
dayOfWeek = javaCalendar.get(Calendar.DAY_OF_WEEK);
}


+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGradient.java View File

@@ -37,9 +37,9 @@ public class ColorPickerGradient extends AbstractComponent implements
try {
COLOR_CHANGE_METHOD = ColorChangeListener.class.getDeclaredMethod(
"colorChanged", new Class[] { ColorChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in ColorPicker");
}
}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerGrid.java View File

@@ -41,9 +41,9 @@ public class ColorPickerGrid extends AbstractComponent
try {
COLOR_CHANGE_METHOD = ColorChangeListener.class.getDeclaredMethod(
"colorChanged", new Class[] { ColorChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in ColorPicker");
}
}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerHistory.java View File

@@ -42,9 +42,9 @@ public class ColorPickerHistory extends CustomComponent
try {
COLOR_CHANGE_METHOD = ColorChangeListener.class.getDeclaredMethod(
"colorChanged", new Class[] { ColorChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in ColorPicker");
}
}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPopup.java View File

@@ -59,9 +59,9 @@ public class ColorPickerPopup extends Window
try {
COLOR_CHANGE_METHOD = ColorChangeListener.class.getDeclaredMethod(
"colorChanged", new Class[] { ColorChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in ColorPicker");
}
}

+ 2
- 2
compatibility-server/src/main/java/com/vaadin/v7/ui/components/colorpicker/ColorPickerPreview.java View File

@@ -41,9 +41,9 @@ public class ColorPickerPreview extends CssLayout
try {
COLOR_CHANGE_METHOD = ColorChangeListener.class.getDeclaredMethod(
"colorChanged", new Class[] { ColorChangeEvent.class });
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in ColorPicker");
}
}

+ 3
- 1
compatibility-server/src/test/java/com/vaadin/v7/data/util/sqlcontainer/connection/MockInitialContextFactory.java View File

@@ -1,5 +1,7 @@
package com.vaadin.v7.data.util.sqlcontainer.connection;

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.spi.InitialContextFactory;
@@ -15,7 +17,7 @@ public class MockInitialContextFactory implements InitialContextFactory {
}

@Override
public Context getInitialContext(java.util.Hashtable<?, ?> environment)
public Context getInitialContext(Hashtable<?, ?> environment)
throws NamingException {
if (mockCtx == null) {
throw new IllegalStateException("mock context was not set.");

+ 1
- 1
compatibility-shared/src/main/java/com/vaadin/v7/shared/ui/colorpicker/Color.java View File

@@ -348,7 +348,7 @@ public class Color implements Serializable {
red = green = blue = (int) (value * 255.0f + 0.5f);
} else {
float h = (hue - (float) Math.floor(hue)) * 6.0f;
float f = h - (float) java.lang.Math.floor(h);
float f = h - (float) Math.floor(h);
float p = value * (1.0f - saturation);
float q = value * (1.0f - saturation * f);
float t = value * (1.0f - (saturation * (1.0f - f)));

+ 27
- 24
server/src/main/java/com/vaadin/event/ListenerMethod.java View File

@@ -18,7 +18,10 @@ package com.vaadin.event;

import java.io.IOException;
import java.io.NotSerializableException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.EventListener;
@@ -83,7 +86,7 @@ public class ListenerMethod implements EventListener, Serializable {
private int eventArgumentIndex;

/* Special serialization to handle method references */
private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
try {
out.defaultWriteObject();
@@ -101,7 +104,7 @@ public class ListenerMethod implements EventListener, Serializable {
}

/* Special serialization to handle method references */
private void readObject(java.io.ObjectInputStream in)
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();
try {
@@ -170,17 +173,17 @@ public class ListenerMethod implements EventListener, Serializable {
* eventArgumentIndex is negative, the triggering event object
* will not be passed to the trigger method, though it is still
* called.
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* if <code>method</code> is not a member of <code>target</code>
* .
*/
public ListenerMethod(Class<?> eventType, Object target, Method method,
Object[] arguments, int eventArgumentIndex)
throws java.lang.IllegalArgumentException {
throws IllegalArgumentException {

// Checks that the object is of correct type
if (!method.getDeclaringClass().isAssignableFrom(target.getClass())) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"The method " + method.getName()
+ " cannot be used for the given target: "
+ target.getClass().getName());
@@ -188,7 +191,7 @@ public class ListenerMethod implements EventListener, Serializable {

// Checks that the event argument is null
if (eventArgumentIndex >= 0 && arguments[eventArgumentIndex] != null) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"argument[" + eventArgumentIndex + "] must be null");
}

@@ -196,7 +199,7 @@ public class ListenerMethod implements EventListener, Serializable {
if (eventArgumentIndex >= 0
&& !method.getParameterTypes()[eventArgumentIndex]
.isAssignableFrom(eventType)) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"The method " + method.getName()
+ " does not accept the given eventType: "
+ eventType.getName());
@@ -236,13 +239,13 @@ public class ListenerMethod implements EventListener, Serializable {
* eventArgumentIndex is negative, the triggering event object
* will not be passed to the trigger method, though it is still
* called.
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* unless exactly one match <code>methodName</code> is found in
* <code>target</code>.
*/
public ListenerMethod(Class<?> eventType, Object target, String methodName,
Object[] arguments, int eventArgumentIndex)
throws java.lang.IllegalArgumentException {
throws IllegalArgumentException {

// Finds the correct method
final Method[] methods = target.getClass().getMethods();
@@ -259,7 +262,7 @@ public class ListenerMethod implements EventListener, Serializable {

// Checks that the event argument is null
if (eventArgumentIndex >= 0 && arguments[eventArgumentIndex] != null) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"argument[" + eventArgumentIndex + "] must be null");
}

@@ -267,7 +270,7 @@ public class ListenerMethod implements EventListener, Serializable {
if (eventArgumentIndex >= 0
&& !method.getParameterTypes()[eventArgumentIndex]
.isAssignableFrom(eventType)) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"The method " + method.getName()
+ " does not accept the given eventType: "
+ eventType.getName());
@@ -302,16 +305,16 @@ public class ListenerMethod implements EventListener, Serializable {
* the trigger method.
* @param arguments
* the arguments to be passed to the trigger method.
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* if <code>method</code> is not a member of <code>target</code>
* .
*/
public ListenerMethod(Class<?> eventType, Object target, Method method,
Object[] arguments) throws java.lang.IllegalArgumentException {
Object[] arguments) throws IllegalArgumentException {

// Check that the object is of correct type
if (!method.getDeclaringClass().isAssignableFrom(target.getClass())) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"The method " + method.getName()
+ " cannot be used for the given target: "
+ target.getClass().getName());
@@ -349,12 +352,12 @@ public class ListenerMethod implements EventListener, Serializable {
* <code>java.lang.IllegalArgumentException</code> is thrown.
* @param arguments
* the arguments to be passed to the trigger method.
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* unless exactly one match <code>methodName</code> is found in
* <code>object</code>.
*/
public ListenerMethod(Class<?> eventType, Object target, String methodName,
Object[] arguments) throws java.lang.IllegalArgumentException {
Object[] arguments) throws IllegalArgumentException {

// Find the correct method
final Method[] methods = target.getClass().getMethods();
@@ -395,16 +398,16 @@ public class ListenerMethod implements EventListener, Serializable {
* the object instance that contains the trigger method.
* @param method
* the trigger method.
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* if <code>method</code> is not a member of <code>object</code>
* .
*/
public ListenerMethod(Class<?> eventType, Object target, Method method)
throws java.lang.IllegalArgumentException {
throws IllegalArgumentException {

// Checks that the object is of correct type
if (!method.getDeclaringClass().isAssignableFrom(target.getClass())) {
throw new java.lang.IllegalArgumentException(
throw new IllegalArgumentException(
"The method " + method.getName()
+ " cannot be used for the given target: "
+ target.getClass().getName());
@@ -451,12 +454,12 @@ public class ListenerMethod implements EventListener, Serializable {
* the name of the trigger method. If the object does not contain
* the method or it contains more than one matching methods
* <code>java.lang.IllegalArgumentException</code> is thrown.
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* unless exactly one match <code>methodName</code> is found in
* <code>target</code>.
*/
public ListenerMethod(Class<?> eventType, Object target, String methodName)
throws java.lang.IllegalArgumentException {
throws IllegalArgumentException {

// Finds the correct method
final Method[] methods = target.getClass().getMethods();
@@ -518,11 +521,11 @@ public class ListenerMethod implements EventListener, Serializable {
method.invoke(target, arguments);
}

} catch (final java.lang.IllegalAccessException e) {
} catch (final IllegalAccessException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error - please report", e);
} catch (final java.lang.reflect.InvocationTargetException e) {
} catch (final InvocationTargetException e) {
// An exception was thrown by the invocation target. Throw it
// forwards.
throw new MethodException(

+ 2
- 2
server/src/main/java/com/vaadin/event/MethodEventSource.java View File

@@ -57,7 +57,7 @@ public interface MethodEventSource extends Serializable {
* @param method
* the activation method.
* @return a registration object for removing the listener
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* unless <code>method</code> has exactly one match in
* <code>object</code>
* @throws NullPointerException
@@ -95,7 +95,7 @@ public interface MethodEventSource extends Serializable {
* @param methodName
* the name of the activation method.
* @return a registration object for removing the listener
* @throws java.lang.IllegalArgumentException
* @throws IllegalArgumentException
* unless <code>method</code> has exactly one match in
* <code>object</code>
* @throws NullPointerException

+ 1
- 1
server/src/main/java/com/vaadin/server/LocaleService.java View File

@@ -152,7 +152,7 @@ public class LocaleService implements Serializable {
/*
* First day of week (0 = sunday, 1 = monday)
*/
final java.util.Calendar cal = new GregorianCalendar(locale);
final Calendar cal = new GregorianCalendar(locale);
localeData.firstDayOfWeek = cal.getFirstDayOfWeek() - 1;

/*

+ 1
- 1
server/src/main/java/com/vaadin/server/PaintTarget.java View File

@@ -475,7 +475,7 @@ public interface PaintTarget extends Serializable {
* @throws PaintException
* if the paint operation failed.
*/
public void addUIDL(java.lang.String uidl) throws PaintException;
public void addUIDL(String uidl) throws PaintException;

/**
* Adds text node. All the contents of the text are XML-escaped.

+ 4
- 2
server/src/main/java/com/vaadin/ui/ConnectorTracker.java View File

@@ -16,6 +16,8 @@
package com.vaadin.ui;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
@@ -727,7 +729,7 @@ public class ConnectorTracker implements Serializable {
}

/* Special serialization to JsonObjects which are not serializable */
private void writeObject(java.io.ObjectOutputStream out)
private void writeObject(ObjectOutputStream out)
throws IOException {
out.defaultWriteObject();
// Convert JsonObjects in diff state to String representation as
@@ -741,7 +743,7 @@ public class ConnectorTracker implements Serializable {
}

/* Special serialization to JsonObjects which are not serializable */
private void readObject(java.io.ObjectInputStream in)
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
in.defaultReadObject();


+ 2
- 2
server/src/main/java/com/vaadin/ui/GridLayout.java View File

@@ -627,7 +627,7 @@ public class GridLayout extends AbstractLayout
* @author Vaadin Ltd.
* @since 3.0
*/
public class OverlapsException extends java.lang.RuntimeException {
public class OverlapsException extends RuntimeException {

private final Area existingArea;

@@ -683,7 +683,7 @@ public class GridLayout extends AbstractLayout
* @author Vaadin Ltd.
* @since 3.0
*/
public class OutOfBoundsException extends java.lang.RuntimeException {
public class OutOfBoundsException extends RuntimeException {

private final Area areaOutOfBounds;


+ 4
- 4
server/src/main/java/com/vaadin/ui/PopupView.java View File

@@ -50,9 +50,9 @@ public class PopupView extends AbstractComponent implements HasComponents {
POPUP_VISIBILITY_METHOD = PopupVisibilityListener.class
.getDeclaredMethod("popupVisibilityChange",
PopupVisibilityEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in PopupView");
}
}
@@ -84,7 +84,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
* @param large
* the full, Component-type representation
*/
public PopupView(final java.lang.String small, final Component large) {
public PopupView(final String small, final Component large) {
this(createContent(small, large));
}

@@ -165,7 +165,7 @@ public class PopupView extends AbstractComponent implements HasComponents {
if (visible) {
visibleComponent = content.getPopupComponent();
if (visibleComponent == null) {
throw new java.lang.IllegalStateException(
throw new IllegalStateException(
"PopupView.Content did not return Component to set visible");
}
if (visibleComponent.getParent() != null) {

+ 2
- 2
server/src/main/java/com/vaadin/ui/TabSheet.java View File

@@ -785,9 +785,9 @@ public class TabSheet extends AbstractComponentContainer
SELECTED_TAB_CHANGE_METHOD = SelectedTabChangeListener.class
.getDeclaredMethod("selectedTabChange",
SelectedTabChangeEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in TabSheet");
}
}

+ 2
- 2
server/src/main/java/com/vaadin/ui/Upload.java View File

@@ -237,9 +237,9 @@ public class Upload extends AbstractComponent
.getDeclaredMethod("uploadStarted", StartedEvent.class);
UPLOAD_SUCCEEDED_METHOD = SucceededListener.class
.getDeclaredMethod("uploadSucceeded", SucceededEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error finding methods in Upload");
}
}

+ 4
- 4
server/src/main/java/com/vaadin/ui/Window.java View File

@@ -366,9 +366,9 @@ public class Window extends Panel
try {
WINDOW_CLOSE_METHOD = CloseListener.class
.getDeclaredMethod("windowClose", CloseEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error, window close method not found");
}
}
@@ -662,9 +662,9 @@ public class Window extends Panel
try {
WINDOW_RESIZE_METHOD = ResizeListener.class
.getDeclaredMethod("windowResized", ResizeEvent.class);
} catch (final java.lang.NoSuchMethodException e) {
} catch (final NoSuchMethodException e) {
// This should never happen
throw new java.lang.RuntimeException(
throw new RuntimeException(
"Internal error, window resized method not found");
}
}

+ 4
- 3
server/src/main/java/com/vaadin/util/ReflectTools.java View File

@@ -18,6 +18,7 @@ package com.vaadin.util;
import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
@@ -82,7 +83,7 @@ public class ReflectTools implements Serializable {
* If the value could not be retrieved
*/
public static Object getJavaFieldValue(Object object,
java.lang.reflect.Field field) throws IllegalArgumentException,
Field field) throws IllegalArgumentException,
IllegalAccessException, InvocationTargetException {
PropertyDescriptor pd;
try {
@@ -126,7 +127,7 @@ public class ReflectTools implements Serializable {
* If the value could not be retrieved
*/
public static Object getJavaFieldValue(Object object,
java.lang.reflect.Field field, Class<?> propertyType)
Field field, Class<?> propertyType)
throws IllegalArgumentException, IllegalAccessException,
InvocationTargetException {
PropertyDescriptor pd;
@@ -173,7 +174,7 @@ public class ReflectTools implements Serializable {
* If the value could not be assigned to the field
*/
public static void setJavaFieldValue(Object object,
java.lang.reflect.Field field, Object value)
Field field, Object value)
throws IllegalAccessException, IllegalArgumentException,
InvocationTargetException {
PropertyDescriptor pd;

+ 4
- 2
server/src/test/java/com/vaadin/util/ReflectToolsGetFieldValueByTypeTest.java View File

@@ -3,6 +3,8 @@ package com.vaadin.util;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

import java.lang.reflect.Field;

import org.junit.Test;

public class ReflectToolsGetFieldValueByTypeTest {
@@ -23,7 +25,7 @@ public class ReflectToolsGetFieldValueByTypeTest {

MySubClass myInstance = new MySubClass();

java.lang.reflect.Field memberField;
Field memberField;
Object fieldValue = false;
try {
memberField = myInstance.getClass().getField("field");
@@ -50,7 +52,7 @@ public class ReflectToolsGetFieldValueByTypeTest {

MySubClass myInstance = new MySubClass();

java.lang.reflect.Field memberField;
Field memberField;
try {
memberField = myInstance.getClass().getField("field");
// Should throw an IllegalArgument exception as the mySubClass class

+ 3
- 1
server/src/test/java/com/vaadin/util/ReflectToolsGetPrimitiveFieldValueTest.java View File

@@ -2,6 +2,8 @@ package com.vaadin.util;

import static org.junit.Assert.assertFalse;

import java.lang.reflect.Field;

import org.junit.Test;

public class ReflectToolsGetPrimitiveFieldValueTest {
@@ -13,7 +15,7 @@ public class ReflectToolsGetPrimitiveFieldValueTest {

MyClass myInstance = new MyClass();

java.lang.reflect.Field memberField;
Field memberField;
Object fieldValue = false;
try {
memberField = myInstance.getClass().getField("field");

+ 1
- 1
shared/src/main/java/com/vaadin/shared/ui/colorpicker/Color.java View File

@@ -347,7 +347,7 @@ public class Color implements Serializable {
red = green = blue = (int) (value * 255.0f + 0.5f);
} else {
float h = (hue - (float) Math.floor(hue)) * 6.0f;
float f = h - (float) java.lang.Math.floor(h);
float f = h - (float) Math.floor(h);
float p = value * (1.0f - saturation);
float q = value * (1.0f - saturation * f);
float t = value * (1.0f - (saturation * (1.0f - f)));

+ 1
- 1
uitest/src/main/java/com/vaadin/tests/RandomLayoutStress.java View File

@@ -89,7 +89,7 @@ public class RandomLayoutStress extends com.vaadin.server.LegacyApplication {
panelBLayout.addComponent(layoutB);

// Create grid layout
final int gridSize = (int) java.lang.Math.sqrt(componentCountC);
final int gridSize = (int) Math.sqrt(componentCountC);
VerticalLayout panelGLayout = new VerticalLayout();
panelGLayout.setMargin(true);
final Panel panelG = new Panel("Panel containing grid layout ("

+ 1
- 1
uitest/src/main/java/com/vaadin/tests/components/colorpicker/ColorPickerTestUI.java View File

@@ -93,7 +93,7 @@ public class ColorPickerTestUI extends AbstractReindeerTestUI {
public class MyImageSource implements StreamResource.StreamSource {

/** The imagebuffer. */
private java.io.ByteArrayOutputStream imagebuffer = null;
private ByteArrayOutputStream imagebuffer;

/** The bg color. */
private final java.awt.Color bgColor;

+ 2
- 2
uitest/src/main/java/com/vaadin/tests/components/table/MissingScrollbar.java View File

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

import java.io.ObjectOutputStream;
import java.io.Serializable;

import com.vaadin.tests.components.TestBase;
@@ -82,8 +83,7 @@ public class MissingScrollbar extends TestBase {
return ic;
}

private void writeObject(java.io.ObjectOutputStream out) throws Exception {

private void writeObject(ObjectOutputStream out) throws Exception {
out.defaultWriteObject();
System.out.println("Serialize " + getClass().getName() + "("
+ (this instanceof Serializable) + ")");

+ 1
- 1
uitest/src/test/java/com/vaadin/tests/components/table/DisabledSortingTableTest.java View File

@@ -17,7 +17,7 @@ public class DisabledSortingTableTest extends MultiBrowserTest {
Class<?> uiClass;

@Override
protected java.lang.Class<?> getUIClass() {
protected Class<?> getUIClass() {
return uiClass;
};


Loading…
Cancel
Save