The constructor Boolean(boolean) is deprecated. WHY?

Why?

2020-01-21 18:46:23.589 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'common.rules', using it anyway:
The constructor Boolean(boolean) is deprecated
The constructor Boolean(boolean) is deprecated

common.rules:

var systemStarted = new Boolean(false)
var mqttStarted  = new Boolean(false)

rule "when system started"
	when
		System started
	then
		if(! systemStarted){
			systemStarted = true
			if(! mqttStarted) {SYS_MQTT_Started.postUpdate(OFF)}
		}
end


rule "Monitor MQTT action addon"
when
	Time cron "0/30 * * * * ?"
then
    if(! mqttStarted){
        try {
            publish("localmqtt", "RPI", "ping mqtt from OH")
        }
        finally {
            mqttStarted = true
            SYS_MQTT_Started.postUpdate(ON)
			publish("localmqtt", "Reseting_omega", "restart_all_omega_relays_module")
        }
    }
end


rule "System start complete (push notification)"
when
	Item SYS_StartComplete changed to ON 
then
    SYS_Notification.sendCommand('Open HAB is actually started' + ';0;16;1;;;;')
end

https://docs.oracle.com/javase/9/docs/api/java/lang/Boolean.html

hi @rossko57,
I am facing the same issue.
How do I declare and use a boolean variable in the code?
Can you share an example please?

thanks

Not really. I think it depends on java version, it doesn’t complain for me.

var Boolean mqttstarted = false
// or
var mqttstarted = Boolean.valueOf(false)

should work

There is also minimalist approach…

var mqttstarted = false

(mqttstarted.class is java.lang.Boolean)