Skip to content

Commit

Permalink
Fix optimization in XmlFriendlyNameCoder. Closes x-stream#237.
Browse files Browse the repository at this point in the history
  • Loading branch information
joehni committed Jan 6, 2021
1 parent 9abed52 commit fabe3ab
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion xstream-distribution/src/content/changes.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<!--
Copyright (C) 2005, 2006 Joe Walnes.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 XStream committers.
Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 XStream committers.
All rights reserved.
The software in this package is published under the terms of the BSD
Expand Down Expand Up @@ -105,6 +105,16 @@ <h1 id="upcoming-1.4.x">Upcoming 1.4.x maintenance release</h1>
<p>Not yet released.</p>
-->

<h1 id="upcoming-1.4.x">Upcoming 1.4.x maintenance release</h1>

<p>Not yet released.</p>

<h2>Minor changes</h2>

<ul>
<li>GHI:#237: Fix optimization in XmlFriendlyNameCoder.</li>
</ul>

<h1 id="1.4.15">1.4.15</h1>

<p>Released December 13, 2020.</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006 Joe Walnes.
* Copyright (C) 2006, 2007, 2008, 2009, 2011, 2013, 2014, 2015, 2019, 2020 XStream Committers.
* Copyright (C) 2006, 2007, 2008, 2009, 2011, 2013, 2014, 2015, 2019, 2020, 2021 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
Expand Down Expand Up @@ -487,7 +487,7 @@ private String encodeName(final String name) {

for (; i < length; i++) {
final char c = name.charAt(i);
if (c < 'A' || (c > 'Z' && c < 'a') || c > 'Z') {
if (c < 'A' || (c > 'Z' && c < 'a') || c > 'z') {
break;
}
}
Expand Down

0 comments on commit fabe3ab

Please sign in to comment.