Skip to content
This repository was archived by the owner on Oct 29, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,31 @@ local.properties
#################
## Java
#################
# Compiled class file
*.class
*.jardesc

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

#################
## Visual Studio
#################
Expand Down Expand Up @@ -132,3 +154,43 @@ Thumbs.db
Desktop.ini

runtime.properties

###############
## Intellij
###############
# User-specific stuff
.idea/

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
.idea/modules.xml
.idea/*.iml
.idea/modules
*.iml
*.ipr

# CMake
cmake-build-*/

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

*.log

38 changes: 35 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>WaarpCommon</artifactId>
<packaging>jar</packaging>
<version>3.1.0</version>
<version>3.1.1</version>
<name>Waarp Common</name>
<description>
The Waarp Common project contains several classes that are common with different
Expand Down Expand Up @@ -166,7 +166,7 @@
<dependency>
<groupId>Waarp</groupId>
<artifactId>WaarpDigest</artifactId>
<version>3.0.6</version>
<version>3.1.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -285,6 +285,27 @@
</dependency>

<!-- Testing dependencies -->
<dependency>
<groupId>com.github.jnr</groupId>
<artifactId>jnr-posix</artifactId>
<optional>true</optional>
<!-- For Testing purpose but could be used in production too -->
<version>3.0.50</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.10.6</version>
<scope>test</scope>
<!-- For Testing purpose but could be used in production too -->
<exclusions>
<exclusion>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down Expand Up @@ -324,7 +345,7 @@
<source>1.6</source>
<target>1.6</target>
<optimize>true</optimize>
<showDeprecations>true</showDeprecations>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
<plugin>
Expand Down Expand Up @@ -416,6 +437,17 @@
<rulesUri>file:///${session.executionRootDirectory}/maven-version-rules.xml</rulesUri>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class CommandAbstractException extends Exception {
public String message = null;

/**
* Unique constructor
* Simplest constructor
*
* @param code
* @param message
Expand All @@ -49,6 +49,19 @@ public CommandAbstractException(ReplyCode code, String message) {
this.message = message;
}

/**
* Constructor with Throwable
*
* @param code
* @param message
* @param e
*/
public CommandAbstractException(ReplyCode code, String message, Throwable e) {
super(code.getMesg(), e);
this.code = code;
this.message = message;
}

/**
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,14 @@ public Reply550Exception(String message) {
super(ReplyCode.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, message);
}

/**
* 550 Requested action not taken. File unavailable (e.g., file not found, no access).
*
* @param message
* @param e
*/
public Reply550Exception(String message, Throwable e) {
super(ReplyCode.REPLY_550_REQUESTED_ACTION_NOT_TAKEN, message, e);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public static boolean waitForHandshake(Channel channel) {
}
return true;
} else {
logger.error("SSL Not found but connected: " + handler.getClass().getName());
logger.info("SSL Not found but connected: {} {}",
handler.getClass().getName());
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ public void select() throws WaarpDatabaseException {
preparedStatement.executeQuery();
if (preparedStatement.getNext()) {
getValues(preparedStatement, allFields);
setFromArray();
isSaved = true;
} else {
throw new WaarpDatabaseNoDataException("No row found");
Expand Down Expand Up @@ -565,6 +564,7 @@ protected void getValues(DbPreparedStatement preparedStatement,
for (DbValue value : values) {
getTrueValue(rs, value);
}
setFromArray();
}

/**
Expand All @@ -576,7 +576,6 @@ protected void getValues(DbPreparedStatement preparedStatement,
public boolean get(DbPreparedStatement preparedStatement) {
try {
getValues(preparedStatement, allFields);
setFromArray();
} catch (WaarpDatabaseNoConnectionException e1) {
return false;
} catch (WaarpDatabaseSqlException e1) {
Expand Down
Loading