[Cherbot-commit] SF.net SVN: cherbot: [103] trunk/src
Status: Alpha
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-06-25 20:51:58
|
Revision: 103
http://svn.sourceforge.net/cherbot/?rev=103&view=rev
Author: christianhujer
Date: 2007-06-25 13:51:55 -0700 (Mon, 25 Jun 2007)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
trunk/src/net/sf/cherbot/metaserver/MetaServerEntry.java
trunk/src/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java
Modified: trunk/src/net/sf/cherbot/metaserver/MetaServerEntry.java
===================================================================
--- trunk/src/net/sf/cherbot/metaserver/MetaServerEntry.java 2007-06-25 20:51:41 UTC (rev 102)
+++ trunk/src/net/sf/cherbot/metaserver/MetaServerEntry.java 2007-06-25 20:51:55 UTC (rev 103)
@@ -20,7 +20,7 @@
private static final long serialVersionUID = 1L;
/** The pattern for parsing an entryString from the metaserver. */
- @NotNull private static final Pattern entryPattern = Pattern.compile("(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)");
+ @NotNull private static final Pattern ENTRY_PATTERN = Pattern.compile("(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)");
/** The ip address of this entry. */
@NotNull private final String ipaddress;
@@ -77,7 +77,7 @@
* @return MetaServerEntry created by parsing <var>entryString</var>.
*/
@NotNull public static MetaServerEntry parse(@NotNull final String entryString) {
- final Matcher matcher = entryPattern.matcher(entryString);
+ final Matcher matcher = ENTRY_PATTERN.matcher(entryString);
if (matcher.matches()) {
return new MetaServerEntry(
matcher.group(1),
Modified: trunk/src/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java
===================================================================
--- trunk/src/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java 2007-06-25 20:51:41 UTC (rev 102)
+++ trunk/src/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java 2007-06-25 20:51:55 UTC (rev 103)
@@ -29,8 +29,8 @@
* @throws IOException in case of I/O problems (unexpected).
*/
@Test public void testParse() throws IOException {
- final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n" +
- "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
+ final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n"
+ + "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
final MetaServerInfo testling = new MetaServerInfo();
testling.parse(new BufferedReader(new StringReader(metaServerString)));
Assert.assertEquals("MetaServerInfo now must contain 2 entries.", 2, testling.size());
@@ -42,8 +42,8 @@
* @throws IOException in case of I/O problems (unexpected).
*/
@Test public void testParseDeletes() throws IOException {
- final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n" +
- "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
+ final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n"
+ + "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
final MetaServerInfo testling = new MetaServerInfo();
testling.parse(new BufferedReader(new StringReader(metaServerString)));
Assert.assertEquals("MetaServerInfo now must contain 2 entries.", 2, testling.size());
@@ -55,8 +55,8 @@
* @throws IOException in case of I/O problems (unexpected).
*/
@Test public void testUpdate() throws IOException {
- final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n" +
- "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
+ final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n"
+ + "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
final MetaServerInfo testling = new MetaServerInfo("", 0);
testling.parse(new BufferedReader(new StringReader(metaServerString)));
Assert.assertEquals("MetaServerInfo now must contain 2 entries.", 2, testling.size());
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|