In a Webex meeting both Keyboard and Mouse can be shared.
Anyone can directly control what is on the screen in realtime.
I just tried it with a current customer and it is a tremendous feature:
Top Bar -> Assign+ -> “Pass Keyboard and Mouse Control”
Clean Code Blog – www.harder-it-consulting.de
Clean Code – Tipps, Tricks for Fullstack React / Java / JavaScript / HTML 5 and more…
In a Webex meeting both Keyboard and Mouse can be shared.
Anyone can directly control what is on the screen in realtime.
I just tried it with a current customer and it is a tremendous feature:
Top Bar -> Assign+ -> “Pass Keyboard and Mouse Control”
If two objects are equal, the hash code must be the same.
But the same hash code does not guarantee that two objects are equal.
Code example for a proper implementation:
@Override
public final boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof MyClassOrInterface)) {
//some do prefer #getClass but I don't
return false;
}
MyClassOrInterface that = (MyClassOrInterface) o;
return Objects.equals(this.hashCode(), that.hashCode()) &&
Objects.equals(name, that.name) &&
Objects.equals(sessionId, that.sessionId);
}
@Override
public final int hashCode() {
return Objects.hash(name, sessionId);
}
Use this:
<!-- Maven -->
<dependency>
<groupId>nl.jqno.equalsverifier</groupId>
<artifactId>equalsverifier</artifactId>
<version>3.0.3</version>
<scope>test</scope>
</dependency>
Write your test:
@Test
public void onEqualsTrueTheHashCodeHasToBeTheSame() {
EqualsVerifier.forClass(Foo.class).verify();
}
private static String URL_REGEX = "\\b(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]";
Symptom:
You try to add an object to a list. But you get an Exception:
java.lang.UnsupportedOperationException
at java.base/java.util.AbstractList.add(AbstractList.java:153)
Cause:
List<SomeEvent> eventList = Arrays.asList(event);
//not working, because the list size is fixed
Solution:
List<SomeEvent> eventList = new ArrayList<>(Arrays.asList(event));
//working, because the list size is NOT fixed
Of course, reading the Javadock of public static <T> List<T> asList(…) would have revealed it in advance:
/**
* Returns a fixed-size list backed by the specified array.
;-D