summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlzhang2011-12-20 22:21:23 (EST)
committer mwu2011-12-20 22:21:23 (EST)
commitc67f627055738cc6e0a08f5a4e57684ba8aa2c25 (patch)
treec7030d0d0b542ef162992e3ab2a8454cadca4329
parentadc93ade5caffa1449251e8ebb4bc6750d6db8d2 (diff)
downloadorg.eclipse.birt-c67f627055738cc6e0a08f5a4e57684ba8aa2c25.zip
org.eclipse.birt-c67f627055738cc6e0a08f5a4e57684ba8aa2c25.tar.gz
org.eclipse.birt-c67f627055738cc6e0a08f5a4e57684ba8aa2c25.tar.bz2
Checkin: Exception is thrown out when trying to remove a relative time
period whose date has no quotations.[46206]
-rw-r--r--data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java27
1 files changed, 18 insertions, 9 deletions
diff --git a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java
index aabbf71..d41748a 100644
--- a/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java
+++ b/data/org.eclipse.birt.report.data.adapter/src/org/eclipse/birt/report/data/adapter/impl/ModelAdapter.java
@@ -387,7 +387,7 @@ public class ModelAdapter implements IModelAdapter
* (non-Javadoc)
* @see org.eclipse.birt.report.data.adapter.api.IModelAdapter#adaptBinding(org.eclipse.birt.report.model.api.ComputedColumnHandle)
*/
- public IBinding adaptBinding( ComputedColumnHandle handle, ExpressionLocation el )
+ public IBinding adaptBinding( ComputedColumnHandle handle, ExpressionLocation el ) throws AdapterException
{
if( el.equals( ExpressionLocation.TABLE ) )
{
@@ -395,9 +395,10 @@ public class ModelAdapter implements IModelAdapter
}
else
{
+ Binding binding = null;
try
{
- Binding binding = new Binding( handle.getName( ) );
+ binding = new Binding( handle.getName( ) );
binding.setAggrFunction( handle.getAggregateFunction( ) == null
? null
: DataAdapterUtil.adaptModelAggregationType( handle.getAggregateFunction( ) ) );
@@ -422,14 +423,22 @@ public class ModelAdapter implements IModelAdapter
.getValue( ),
ExpressionLocation.CUBE ) );
}
+
+ }
+ catch ( Exception e )
+ {
+ logger.log(Level.WARNING, e.getMessage(), e);
+ return null;
+ }
+ try
+ {
binding.setTimeFunction( adaptTimeFunction( handle ) );
- return binding;
- }
- catch ( Exception e )
- {
- logger.log( Level.WARNING, e.getMessage( ), e );
- return null;
- }
+ }
+ catch( BirtException ex)
+ {
+ throw new AdapterException( ex.getLocalizedMessage() );
+ }
+ return binding;
}
}