Small change to accuracy of java doc

Changed 'and' to 'or' when describing the circumstances that an IllegalArgumentException will be thrown, and it will occur if either condition is met.