You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ye...@apache.org on 2009/04/20 18:58:29 UTC
svn commit: r766755 - in /poi/trunk/src:
java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
Author: yegor
Date: Mon Apr 20 16:58:29 2009
New Revision: 766755
URL: http://svn.apache.org/viewvc?rev=766755&view=rev
Log:
moved 'throw' into else clause avoiding exception on every call of cloneStyleFrom, see bugzilla 47054
Modified:
poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java?rev=766755&r1=766754&r2=766755&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/HSSFCellStyle.java Mon Apr 20 16:58:29 2009
@@ -814,8 +814,9 @@
public void cloneStyleFrom(CellStyle source) {
if(source instanceof HSSFCellStyle) {
this.cloneStyleFrom((HSSFCellStyle)source);
+ } else {
+ throw new IllegalArgumentException("Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
}
- throw new IllegalArgumentException("Can only clone from one HSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
}
public void cloneStyleFrom(HSSFCellStyle source) {
// First we need to clone the extended format
Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java?rev=766755&r1=766754&r2=766755&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFCellStyle.java Mon Apr 20 16:58:29 2009
@@ -112,8 +112,9 @@
public void cloneStyleFrom(CellStyle source) {
if(source instanceof XSSFCellStyle) {
this.cloneStyleFrom(source);
+ } else {
+ throw new IllegalArgumentException("Can only clone from one XSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
}
- throw new IllegalArgumentException("Can only clone from one XSSFCellStyle to another, not between HSSFCellStyle and XSSFCellStyle");
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org