Skip to content

Commit ecf5d75

Browse files
authored
Merge pull request #77 from bocops/master
declare exception throwing in constructor
2 parents e19180d + bb70453 commit ecf5d75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/com/google/openlocationcode/OpenLocationCode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public double getEastLongitude() {
152152
* @throws IlegalArgumentException when the passed code is not valid.
153153
* @constructor
154154
*/
155-
public OpenLocationCode(String code) {
155+
public OpenLocationCode(String code) throws IllegalArgumentException {
156156
if (!isValidCode(code.toUpperCase())) {
157157
throw new IllegalArgumentException(
158158
"The provided code '" + code + "' is not a valid Open Location Code.");

0 commit comments

Comments
 (0)