Set System propery to Null in Java -


in unit tests need set "workingdir" system property null.

but can not somesing this, because give me nullpointerexception:

system.setproperty("workingdir", null); 

how can it?

you can't set property have actual null value - can clear it, this:

system.clearproperty("workingdir"); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -