Skip to content

Commit

Permalink
Revert GridTester changes, and fix java doc for the newly added getHa…
Browse files Browse the repository at this point in the history
…shableKey() method, fix imports.
  • Loading branch information
czp13 committed Mar 15, 2023
1 parent e7a5d46 commit b5e564d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,8 @@ private String getValueProviderString(int row, Grid.Column targetColumn)
ColumnPathRenderer renderer = (ColumnPathRenderer) targetColumn
.getRenderer();

Field f = ColumnPathRenderer.class.getDeclaredField("provider");
Field f = ColumnPathRenderer.class
.getDeclaredField("provider");
f.setAccessible(true);

final ValueProvider columnValueProvider = (ValueProvider) f
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import com.vaadin.flow.component.Key
import com.vaadin.flow.component.ShortcutRegistration
import elemental.json.impl.JreJsonFactory
import elemental.json.impl.JreJsonObject
import java.lang.reflect.InvocationTargetException

/**
* Take a look at `DomEventListenerWrapper.matchesFilter()` to see why this is necessary.
Expand All @@ -27,25 +26,11 @@ private class MockFilterJsonObject(val key: Key, val modifiers: Set<Key>) : JreJ
}

/**
* This method is used to get the HashableKey object from the
* ShortcutRegistration class. This is needed because the HashableKey class
* is private, and we need to create an instance of it to test the
* generateEventModifierFilter method.
* Returns a HashableKey instance for the given key modifier.
* @param keyModifier the key modifier
* @return the HashableKey instance
*
* @param keyModifier
* @return
* @throws ClassNotFoundException
* @throws InvocationTargetException
* @throws InstantiationException
* @throws IllegalAccessException
*/
@Throws(
ClassNotFoundException::class,
InvocationTargetException::class,
InstantiationException::class,
IllegalAccessException::class
)

*/
private fun getHashableKey(keyModifier: Key): Any? {
return chashableKey.newInstance(keyModifier)
}
Expand Down

0 comments on commit b5e564d

Please sign in to comment.