Kaydet (Commit) 38272ba9 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Scope reduction by throwing early.

Change-Id: Ic0b7b69b8c4e57064b31ef62ddceaf6094ca9991
üst 059ce597
......@@ -335,8 +335,10 @@ Reference< beans::XPropertySet >
::std::vector< Reference< chart2::data::XLabeledDataSequence > > aValuesSeries(
DataSeriesHelper::getAllDataSequencesByRole( aSequences , "values", true ) );
if( !aValuesSeries.empty() )
{
if (aValuesSeries.empty())
throw lang::IndexOutOfBoundsException();
Reference< chart2::data::XDataSequence > xSeq( aValuesSeries.front()->getValues() );
if( 0 <= nIndex && nIndex < xSeq->getData().getLength() )
{
......@@ -365,11 +367,6 @@ Reference< beans::XPropertySet >
ModifyListenerHelper::addListener( xResult, xModifyEventForwarder );
}
}
}
else
{
throw lang::IndexOutOfBoundsException();
}
return xResult;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment