-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c641a27
commit 325a5e4
Showing
17 changed files
with
100 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>What's new in Commons Lang 2.4?</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
@@ -26,6 +28,7 @@ limitations under the License. | |
<p>Commons Lang 2.4 is out, and the obvious question is: <em>"So what? What's changed?"</em>.</p> | ||
<p>This article aims to briefly cover the changes and save you from having to dig through each JIRA | ||
issue to see what went on in the year of development between Lang 2.3 and 2.4.</p> | ||
</section> | ||
<section name="Deprecations"> | ||
<p>First, let us start with a couple of deprecations. As you can see in the release notes, we chose | ||
to deprecate the <a href="https://commons.apache.org/proper/commons-lang/javadocs/api-2.4/org/apache/commons/lang/ObjectUtils.html#appendIdentityToString(java.lang.StringBuffer,%20java.lang.Object)"><code>ObjectUtils.appendIdentityToString(StringBuffer, Object)</code></a> method as its | ||
|
@@ -60,7 +63,7 @@ followed by a four-digit number, and that it is customary within our organizatio | |
with a hyphen following the department identifier. Here we'll represent the EIN as a simple | ||
String (of course in real life we would likely create a class composed of department and number). | ||
We can create a custom <code>Format</code> class: | ||
<pre><code> | ||
<source> | ||
public class EINFormat extends Format { | ||
private char[] idMask; | ||
|
||
|
@@ -92,10 +95,10 @@ public class EINFormat extends Format { | |
return source.substring(idx, endIdx).deleteCharAt(2); | ||
} | ||
} | ||
</code></pre> | ||
</source> | ||
Our custom EIN format is made available for <code>MessageFormat</code>-style processing by a | ||
<code>FormatFactory</code> implementation: | ||
<pre><code> | ||
<source> | ||
public class EINFormatFactory implements FormatFactory { | ||
public static final String EIN_FORMAT = "ein"; | ||
public Format getFormat(String name, String arguments, Locale locale) { | ||
|
@@ -108,19 +111,19 @@ public class EINFormatFactory implements FormatFactory { | |
return null; | ||
} | ||
} | ||
</code></pre> | ||
</source> | ||
|
||
Now you simply provide a <code>java.util.Map<String, FormatFactory></code> registry (keyed | ||
by format type) to <code>ExtendedMessageFormat</code>: | ||
<pre><code> | ||
<source> | ||
new ExtendedMessageFormat("EIN: {0,ein}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory())); | ||
</code></pre> | ||
</source> | ||
As expected, this will render a String EIN "AA9999" as: <code>"EIN: AA-9999"</code>. | ||
<br /> <br /> | ||
If we wanted to trigger the EIN masking code, we could trigger that in the format pattern: | ||
<pre><code> | ||
<source> | ||
new ExtendedMessageFormat("EIN: {0,ein,#}", Collections.singletonMap(EINFormatFactory.EIN_FORMAT, new EINFormatFactory())); | ||
</code></pre> | ||
</source> | ||
This should render "AA9999" as: <code>"EIN: AA-####"</code>. | ||
<br /> <br /> | ||
You can also use <code>ExtendedMessageFormat</code> to override any or all of the built-in | ||
|
@@ -189,7 +192,5 @@ and fortunately there are some nice groupings that we can discuss instead:</p> | |
<p>Hopefully that was all of interest. Don't forget to download <a href="https://commons.apache.org/lang/download_lang.cgi">Lang 2.4</a>, or, for the Maven repository users, upgrade your <version> tag to 2.4. Please feel free to raise any questions you might have on the <a href="mail-lists.html">mailing lists</a>, and report bugs or enhancements in the <a href="issue-tracking.html">issue tracker</a>.</p> | ||
</section> | ||
|
||
</section> | ||
|
||
</body> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>What's new in Commons Lang 2.5?</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
@@ -28,6 +30,7 @@ limitations under the License. | |
issue to see what went on in the two years of development between Lang 2.4 and 2.5.</p> | ||
<p>Two years?!? Yes, it's true. The reason is that 2.5 represents the backwards compatible changes in the | ||
nearly complete Java-5 focused Lang 3.0. </p> | ||
</section> | ||
<section name="Deprecations"> | ||
<p>There were no new deprecations in 2.5. </p> | ||
</section> | ||
|
@@ -129,7 +132,5 @@ ToStringStyle meant that containers could end up with memory leaks. This was rew | |
<p>Hopefully that was all of interest. Don't forget to download <a href="https://commons.apache.org/lang/download_lang.cgi">Lang 2.5</a>, or, for the Maven repository users, upgrade your <version> tag to 2.5. Please feel free to raise any questions you might have on the <a href="mail-lists.html">mailing lists</a>, and report bugs or enhancements in the <a href="issue-tracking.html">issue tracker</a>.</p> | ||
</section> | ||
|
||
</section> | ||
|
||
</body> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>What's new in Commons Lang 3.0?</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
@@ -24,6 +26,7 @@ limitations under the License. | |
|
||
<section name="What's new in Commons Lang 3.0?"> | ||
<p>Commons Lang 3.0 is out, and the obvious question is: <em>"So what? What's changed?"</em>.</p> | ||
</section> | ||
<section name="The big story"> | ||
<p>Lang is now Java 5 based. We've generified the API, moved certain APIs to support <code>varargs</code> and thrown out any features | ||
that are now supported by Java itself. We've removed the deprecated parts of the API and have also removed some features that | ||
|
@@ -84,11 +87,11 @@ some additional classes in this area which are intended to further simplify the | |
development of concurrent applications.</p> | ||
<p>The classes located in the <code>concurrent</code> package can be roughly | ||
divided into the following categories: | ||
</p> | ||
<ul> | ||
<li>Utility classes</li> | ||
<li>Initializer classes</li> | ||
</ul> | ||
</p> | ||
<p>Classes of the former category provide some basic functionality a developer | ||
typically has to implement manually again and again. Examples are a configurable | ||
<code>ThreadFactory</code> implementation or utility methods for the handling of | ||
|
@@ -202,7 +205,5 @@ general-purpose mechanism to raise an <code>IllegalArgumentException</code>.</li | |
</section> | ||
--> | ||
|
||
</section> | ||
|
||
</body> | ||
</document> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>Building</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>Home</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.0 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.1 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.2 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.3 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.4 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.5 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>2.6 Release Notes</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,9 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<document> | ||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>Upgrade from 2.5 to 3.0</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,9 @@ See the License for the specific language governing permissions and | |
limitations under the License. | ||
--> | ||
|
||
<document> | ||
|
||
<document xmlns="http://maven.apache.org/XDOC/2.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd"> | ||
<properties> | ||
<title>Commons Lang - User guide</title> | ||
<author email="[email protected]">Commons Documentation Team</author> | ||
|
@@ -26,7 +27,9 @@ limitations under the License. | |
<body> | ||
|
||
<section name='User guide for Commons "Lang"'> | ||
Looking for the User Guide? It has been moved to the package <a href="javadocs/api-release/index.html">Javadoc</a>. | ||
<p> | ||
The User Guide has moved to the package <a href="javadocs/api-release/index.html">Javadoc</a>. | ||
</p> | ||
</section> | ||
|
||
</body> | ||
|