Mistři v programování na #hovnokod

Když standardní namespace nevyhovuje...

class _app_°_app_°view__html_index 
    extends _app_°_base_°base_app__view_
{
   ...
}

Anonymous,

Aneb kdyz vam metoda vraci string v new misto objektu

Can't locate object method "add_method" via package "RPC::XML::Server::new: Unable to create HTTP::Daemon object" (perhaps you forgot to load "RPC::XML::Server::new: Unable to create HTTP::Daemon object"?) at OCFsim.pm line 21.

Michal Konečný,


Anonymous,

Null se přece musí ošetřit :)

public void setSelectedPracovisko(Object selectedItem) {
	if (selectedItem == null) {
		selectedPracovisko = null;
	} else {
		selectedPracovisko = (MPracovisko) selectedItem;
	}
}

Anonymous,

no comment

private boolean isPhoneValid() {
        boolean value = false;
        value = !TextUtils.isEmpty(phoneNumber.get());
        value = phoneNumber.get().length() > 9;
        return !TextUtils.isEmpty(phoneNumber.get()) &&
                phoneNumber.get().length() > 9 &&
                ValidationUtils.isPhoneNumberValid(phoneNumber.get());
    }

Anonymous,