Depends on the requirement. At first glance, it looks useless, but the class may implement an interface where for this special class it is absolutely correct to always return true or false.
Example:
public interface Vehicle {
public boolean hasTires();
}
public class Car implements Vehicle {
public boolean hasTires() {
return true;
}
}
Edit
OK, this was not the case. I took the opportunity to refactor the code for readability..
public boolean ruleFour(Flight flight, Pilot pilot) {
SimpleTimeZone offset = timeZones.get(flight.getDeparture());
int rawOffset = offset.getRawOffset();
if (rawOffset != 0) {
rawOffset = rawOffset / 3600000; // converts into hours
}
GregorianCalendar start = flight.getDutyStart();
int localTime = (start.get(Calendar.HOUR_OF_DAY)) + rawOffset;
if (localTime <= 6) {
if (pilot.getOnDayOff()) {
//runs if they are/were off that day
}
return true; // can work it as weren't off that day.
}
return true; // as start time is not 06:00 local
}
It really looks like uncompleted work. The method name implies that if a rule had to be tested, something like if a pilot is available for a scheduled flight or so. Of course, a pilot may not be available (pilot not on duty) and this is currently not reflected in the method.