halloween
(Hallo Ween)
February 15, 2017, 8:06am
1
Hi,
here is a list of my imports in the different rule-files i used in OH1:
import org.openhab.core.library.types.*
import org.openhab.core.types.Command
import org.openhab.core.persistence.*
import org.joda.time.*
import org.openhab.model.script.actions.*
import java.lang.Math
import java.util.concurrent.locks.ReentrantLock
import java.util.Calendar
import java.util.Date
import java.util.TimeZone
import java.text.SimpleDateFormat
import java.util.Map
Which of them do i still need in OH2?
import org.openhab.core.*
import org.joda.time.*
This two imports aren´t needed anymore in OH2? So the first block of my imports in the list above can be removed.
Can i remove this also?
import org.openhab.model.*
import java.lang.*
import java.util.*
import java.text.*
lopez1de
(Markus Gehlhaar)
February 15, 2017, 11:22am
2
The migration doc says:
All references to org.openhab.core.* in imports and class references should be removed. All of these classes are automatically included and have moved.
and
import org.joda.time.* statements should also be removed.
http://docs.openhab.org/tutorials/migration.html#rules
halloween
(Hallo Ween)
February 15, 2017, 11:46am
3
Yes, i have already read this.
But i think @rlkoshak said in another post, you can remove all org.openhab., not just org.openhab.core. - but i don´t know if he just wantet to say the same like it is written in the documentation.
What is a class-reference?
lopez1de
(Markus Gehlhaar)
February 15, 2017, 12:01pm
4
You can savly remove the first block. For the second I guess you have to keep it. That is what I did for my rule files.