Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.

Commit 03867d1

Browse files
Add Junit to v3.1.0
1 parent cbd7573 commit 03867d1

47 files changed

Lines changed: 5511 additions & 1828 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,31 @@ local.properties
3232
#################
3333
## Java
3434
#################
35+
# Compiled class file
3536
*.class
3637
*.jardesc
3738

39+
# Log file
40+
*.log
41+
42+
# BlueJ files
43+
*.ctxt
44+
45+
# Mobile Tools for Java (J2ME)
46+
.mtj.tmp/
47+
48+
# Package Files #
49+
*.jar
50+
*.war
51+
*.nar
52+
*.ear
53+
*.zip
54+
*.tar.gz
55+
*.rar
56+
57+
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
58+
hs_err_pid*
59+
3860
#################
3961
## Visual Studio
4062
#################
@@ -132,3 +154,43 @@ Thumbs.db
132154
Desktop.ini
133155

134156
runtime.properties
157+
158+
###############
159+
## Intellij
160+
###############
161+
# User-specific stuff
162+
.idea/
163+
164+
# Gradle and Maven with auto-import
165+
# When using Gradle or Maven with auto-import, you should exclude module files,
166+
# since they will be recreated, and may cause churn. Uncomment if using
167+
# auto-import.
168+
.idea/modules.xml
169+
.idea/*.iml
170+
.idea/modules
171+
*.iml
172+
*.ipr
173+
174+
# CMake
175+
cmake-build-*/
176+
177+
# File-based project format
178+
*.iws
179+
180+
# IntelliJ
181+
out/
182+
183+
# mpeltonen/sbt-idea plugin
184+
.idea_modules/
185+
186+
# JIRA plugin
187+
atlassian-ide-plugin.xml
188+
189+
# Crashlytics plugin (for Android Studio and IntelliJ)
190+
com_crashlytics_export_strings.xml
191+
crashlytics.properties
192+
crashlytics-build.properties
193+
fabric.properties
194+
195+
*.log
196+

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<artifactId>WaarpCommon</artifactId>
55
<packaging>jar</packaging>
6-
<version>3.1.0</version>
6+
<version>3.1.1</version>
77
<name>Waarp Common</name>
88
<description>
99
The Waarp Common project contains several classes that are common with different
@@ -166,7 +166,7 @@
166166
<dependency>
167167
<groupId>Waarp</groupId>
168168
<artifactId>WaarpDigest</artifactId>
169-
<version>3.0.6</version>
169+
<version>3.1.0</version>
170170
</dependency>
171171

172172
<dependency>
@@ -324,7 +324,7 @@
324324
<source>1.6</source>
325325
<target>1.6</target>
326326
<optimize>true</optimize>
327-
<showDeprecations>true</showDeprecations>
327+
<showDeprecation>true</showDeprecation>
328328
</configuration>
329329
</plugin>
330330
<plugin>

src/main/java/org/waarp/common/command/exception/CommandAbstractException.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public abstract class CommandAbstractException extends Exception {
3838
public String message = null;
3939

4040
/**
41-
* Unique constructor
41+
* Simplest constructor
4242
*
4343
* @param code
4444
* @param message
@@ -49,6 +49,19 @@ public CommandAbstractException(ReplyCode code, String message) {
4949
this.message = message;
5050
}
5151

52+
/**
53+
* Constructor with Throwable
54+
*
55+
* @param code
56+
* @param message
57+
* @param e
58+
*/
59+
public CommandAbstractException(ReplyCode code, String message, Throwable e) {
60+
super(code.getMesg(), e);
61+
this.code = code;
62+
this.message = message;
63+
}
64+
5265
/**
5366
*
5467
*/

src/main/java/org/waarp/common/command/exception/Reply550Exception.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,14 @@ public Reply550Exception(String message) {
4141
super(ReplyCode.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, message);
4242
}
4343

44+
/**
45+
* 550 Requested action not taken. File unavailable (e.g., file not found, no access).
46+
*
47+
* @param message
48+
* @param e
49+
*/
50+
public Reply550Exception(String message, Throwable e) {
51+
super(ReplyCode.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, message, e);
52+
}
53+
4454
}

src/main/java/org/waarp/common/crypto/ssl/WaarpSslUtility.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ public static boolean waitForHandshake(Channel channel) {
124124
}
125125
return true;
126126
} else {
127-
logger.error("SSL Not found but connected: " + handler.getClass().getName());
127+
logger.info("SSL Not found but connected: {} {}",
128+
handler.getClass().getName());
128129
return true;
129130
}
130131
}

src/main/java/org/waarp/common/database/data/AbstractDbData.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,6 @@ public void select() throws WaarpDatabaseException {
195195
preparedStatement.executeQuery();
196196
if (preparedStatement.getNext()) {
197197
getValues(preparedStatement, allFields);
198-
setFromArray();
199198
isSaved = true;
200199
} else {
201200
throw new WaarpDatabaseNoDataException("No row found");
@@ -565,6 +564,7 @@ protected void getValues(DbPreparedStatement preparedStatement,
565564
for (DbValue value : values) {
566565
getTrueValue(rs, value);
567566
}
567+
setFromArray();
568568
}
569569

570570
/**
@@ -576,7 +576,6 @@ protected void getValues(DbPreparedStatement preparedStatement,
576576
public boolean get(DbPreparedStatement preparedStatement) {
577577
try {
578578
getValues(preparedStatement, allFields);
579-
setFromArray();
580579
} catch (WaarpDatabaseNoConnectionException e1) {
581580
return false;
582581
} catch (WaarpDatabaseSqlException e1) {

0 commit comments

Comments
 (0)