Skip to content

Commit

Permalink
Align implementations of StringToUUIDConverter and UUIDEditor
Browse files Browse the repository at this point in the history
Closes gh-23940
  • Loading branch information
sbrannen committed Nov 6, 2019
1 parent 92228f0 commit 29b31ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -34,7 +34,7 @@ public class UUIDEditor extends PropertyEditorSupport {
@Override
public void setAsText(String text) throws IllegalArgumentException {
if (StringUtils.hasText(text)) {
setValue(UUID.fromString(text));
setValue(UUID.fromString(text.trim()));
}
else {
setValue(null);
Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -32,7 +32,7 @@ final class StringToUUIDConverter implements Converter<String, UUID> {

@Override
public UUID convert(String source) {
return (StringUtils.hasLength(source) ? UUID.fromString(source.trim()) : null);
return (StringUtils.hasText(source) ? UUID.fromString(source.trim()) : null);
}

}

0 comments on commit 29b31ca

Please sign in to comment.