Re: Cast Exception

2023-12-05 Thread Junrui Lee
Hello Tauseef, The issue you're encountering is due to the fact that the Properties class in Java stores both keys and values as Strings. When you are trying to cast the value directly to Double, it throws a ClassCastException because values from the properties file are loaded as String and cannot

Re: Cast Exception

2023-12-05 Thread Tauseef Janvekar
Dear Team, After changing the code to the below, error got resolved Map rules = alerts.entrySet().stream() .collect(Collectors.toMap(e -> (String) e.getKey(), e -> Double.parseDouble ((String)e.getValue(; Thanks, Tauseef On Tue, 5 Dec 2023 at 14:00, Tauseef Janvekar wrote: > Dear Team,