This repository was archived by the owner on Oct 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/main/java/gov/osti/services Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ public static boolean isValidEmail(String value) {
271271 public static boolean isValidUrl (String value ) {
272272 return ( null ==value ) ?
273273 false :
274- URL_PATTERN .matcher (value ).matches ();
274+ URL_PATTERN .matcher (value . trim () ).matches ();
275275 }
276276
277277 /**
@@ -350,8 +350,8 @@ public static boolean isValidRepositoryLink(String value) {
350350 return false ;
351351
352352 // check what we consider "valid" for repository info
353- return (GitRepository .isValid (value ) ||
354- SubversionRepository .isValid (value ));
353+ return (GitRepository .isValid (value . trim ())) ||
354+ SubversionRepository .isValid (value . trim ( ));
355355 }
356356
357357 /**
@@ -363,7 +363,7 @@ public static boolean isValidRepositoryLink(String value) {
363363 */
364364 public static boolean isValidDoi (String value ) {
365365 // make sure the value, if present, conforms to DOI pattern.
366- return (null ==value ) ? false : DOI_PATTERN .matcher (value ).find ();
366+ return (null ==value ) ? false : DOI_PATTERN .matcher (value . trim () ).find ();
367367 }
368368
369369 /**
You can’t perform that action at this time.
0 commit comments