If you are getting the following error when you are building your Java project using maven or gradle:
Failed to transfer file: http://repo1.maven.org/maven2.
Return code is: 501 , ReasonPhrase:HTTPS Required
Failed to transfer file: http://repo1.maven.org/maven2.
Return code is: 501 , ReasonPhrase:HTTPS Required
So, as always first thing which we considered to use Redis. However, we don't have ready to use the Redis cluster and we started looking for other solutions in a market. Finally, I saw there is a Hazelcast which allows sharing data between nodes even without having the Hazelcast cluster. Of course, it is working when you are running in the same network. So, nodes should be able to multicast and make a proper cluster.
List list = new ArrayList(); list.add("String test"); list.add(new Date()); String s = (String) list.get(0);From code above you can expect ClassCastException because if you try to assign 2nd item to String it will not succeed and you will get an exception during runtime. To prevent it you need to check if your type is correct and then cast as below