Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove commons-lang dependency, use Util.isBlank(String) #1286

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
5 changes: 0 additions & 5 deletions mondrian/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>${commons-lang.version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
Expand Down
10 changes: 4 additions & 6 deletions mondrian/src/it/java/mondrian/rolap/RolapConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
import mondrian.olap.Util;
import mondrian.spi.Dialect;
import mondrian.test.TestContext;
import mondrian.util.Pair;

import junit.framework.TestCase;

import org.apache.commons.lang.StringUtils;

import java.sql.Connection;
import java.sql.SQLException;
Expand Down Expand Up @@ -493,7 +491,7 @@ public void testGetJdbcConnectionWhenJdbcIsNull() {
} catch (RuntimeException ex) {
assertTrue(
connectInfo.toString(),
StringUtils.isBlank(connectInfo.toString()));
Util.isBlank(connectInfo.toString()));
}
}

Expand All @@ -511,7 +509,7 @@ public void testJdbcConnectionString() {
DataSource dataSource =
RolapConnection.createDataSource(null, properties, connectInfo);

assertFalse(StringUtils.isBlank(connectInfo.toString()));
assertFalse(Util.isBlank(connectInfo.toString()));

String[] parseconnectInfo = connectInfo.toString().split(";");
for (String parseconnectInfoVals : parseconnectInfo) {
Expand All @@ -535,7 +533,7 @@ public void testJdbcConnectionStringWithoutDatabase() {
DataSource dataSource =
RolapConnection.createDataSource(null, properties, connectInfo);

assertFalse(StringUtils.isBlank(connectInfo.toString()));
assertFalse(Utils.isBlank(connectInfo.toString()));
assertFalse(connectInfo.toString().contains("databaseName"));
}

Expand All @@ -549,7 +547,7 @@ public void testJdbcConnectionStringWithoutIntegratedSecurity() {
DataSource dataSource =
RolapConnection.createDataSource(null, properties, connectInfo);

assertFalse(StringUtils.isBlank(connectInfo.toString()));
assertFalse(Utils.isBlank(connectInfo.toString()));
assertFalse(connectInfo.toString().contains("integratedSecurity"));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import mondrian.spi.Dialect;
import mondrian.spi.DialectManager;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.*;

import java.io.*;
Expand Down Expand Up @@ -352,7 +351,7 @@ public static void main(String[] args) {
* populating tables and creating indexes
*/
private void load() throws Exception {
if (!StringUtils.isBlank(jdbcDrivers)) {
if (!Util.isBlank(jdbcDrivers)) {
RolapUtil.loadDrivers(jdbcDrivers);
}

Expand Down
5 changes: 2 additions & 3 deletions mondrian/src/main/java/mondrian/rolap/RolapConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import mondrian.spi.impl.JndiDataSourceResolver;
import mondrian.util.*;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;

import org.eigenbase.util.property.StringProperty;
Expand Down Expand Up @@ -1136,11 +1135,11 @@ private static String getJdbcConnectionString( Util.PropertyList connectInfo ) {

String jdbc = connectInfo.get( RolapConnectionProperties.Jdbc.name() );

if ( StringUtils.isBlank( jdbc ) ) {
if ( Util.isBlank( jdbc ) ) {
return null;
}

String database = StringUtils.isBlank( connectInfo.get( "databaseName" ) )
String database = Util.isBlank( connectInfo.get( "databaseName" ) )
? "" : ";databaseName=" + connectInfo.get( "databaseName" );
String integratedSecurity = Boolean.parseBoolean( connectInfo.get( "integratedSecurity" ) )
? ";integratedSecurity=true" : "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import mondrian.rolap.*;
import mondrian.rolap.sql.SqlQuery;

import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;

import java.util.*;
Expand Down
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
<olap4j-xmlaserver.version>1.2.0</olap4j-xmlaserver.version>
<eigenbase-xom.version>1.3.5</eigenbase-xom.version>
<servlet-api.version>2.4</servlet-api.version>
<commons-lang.version>2.4</commons-lang.version>
<xmlunit.version>1.1</xmlunit.version>
</properties>
<profiles>
Expand Down