Skip to content

Commit 42d1138

Browse files
committed
Update commons-lang3 to 3.17.0
1 parent e1761db commit 42d1138

4 files changed

Lines changed: 12 additions & 13 deletions

File tree

pom.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,12 @@
9292
<dependency>
9393
<groupId>org.apache.commons</groupId>
9494
<artifactId>commons-configuration2</artifactId>
95-
<version>2.11.0</version>
95+
<version>2.12.0</version>
9696
</dependency>
9797
<dependency>
9898
<groupId>org.apache.commons</groupId>
9999
<artifactId>commons-lang3</artifactId>
100-
<!-- 3.15.0 uses a secure random which is extremely slow, see #1194 in Gemma for details -->
101-
<version>3.14.0</version>
100+
<version>3.17.0</version>
102101
</dependency>
103102
<dependency>
104103
<groupId>commons-io</groupId>
@@ -119,7 +118,7 @@
119118
<dependency>
120119
<groupId>commons-logging</groupId>
121120
<artifactId>commons-logging</artifactId>
122-
<version>1.3.2</version>
121+
<version>1.3.5</version>
123122
<scope>runtime</scope>
124123
</dependency>
125124
<dependency>

src/ubic/basecode/ontology/jena/AbstractOntologyService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public synchronized void startInitializationThread( boolean forceLoad, boolean f
130130
} catch ( Exception e ) {
131131
log.error( "Initialization of {} failed.", this, e );
132132
}
133-
}, getOntologyName() + "_load_thread_" + RandomStringUtils.randomAlphanumeric( 5 ) );
133+
}, getOntologyName() + "_load_thread_" + RandomStringUtils.insecure().nextAlphanumeric( 5 ) );
134134
// To prevent VM from waiting on this thread to shut down (if shutting down).
135135
initializationThread.setDaemon( true );
136136
initializationThread.start();

src/ubic/basecode/util/r/AbstractRClient.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public abstract class AbstractRClient implements RClient {
5555
* @return
5656
*/
5757
public static String variableIdentityNumber( Object ob ) {
58-
return Integer.toString( Math.abs( ob.hashCode() + 1 ) ) + RandomStringUtils.randomAlphabetic( 6 );
58+
return Integer.toString( Math.abs( ob.hashCode() + 1 ) ) + RandomStringUtils.insecure().nextAlphabetic( 6 );
5959
}
6060

6161
/**
@@ -455,7 +455,7 @@ public int[] intArrayEval( String command ) {
455455
@SuppressWarnings({ "unchecked" })
456456
public LinearModelSummary linearModel( double[] data, Map<String, List<?>> factors ) {
457457

458-
String datName = RandomStringUtils.randomAlphabetic( 10 );
458+
String datName = RandomStringUtils.insecure().nextAlphabetic( 10 );
459459
assign( datName, data );
460460

461461
for ( String factorName : factors.keySet() ) {
@@ -475,7 +475,7 @@ public LinearModelSummary linearModel( double[] data, Map<String, List<?>> facto
475475

476476
String modelDeclaration = datName + " ~ " + StringUtils.join( factors.keySet(), "+" );
477477

478-
String lmName = RandomStringUtils.randomAlphabetic( 10 );
478+
String lmName = RandomStringUtils.insecure().nextAlphabetic( 10 );
479479
String command = lmName + "<-lm(" + modelDeclaration + ", na.action=na.exclude)";
480480
log.debug( command );
481481
voidEval( command );
@@ -498,14 +498,14 @@ public LinearModelSummary linearModel( double[] data, Map<String, List<?>> facto
498498
@Override
499499
public LinearModelSummary linearModel( double[] data, ObjectMatrix<String, String, Object> d ) {
500500

501-
String datName = RandomStringUtils.randomAlphabetic( 10 );
501+
String datName = RandomStringUtils.insecure().nextAlphabetic( 10 );
502502
assign( datName, data );
503503

504504
String df = dataFrame( d );
505505

506506
String varNames = StringUtils.join( d.getColNames(), "+" );
507507

508-
String lmName = RandomStringUtils.randomAlphabetic( 10 );
508+
String lmName = RandomStringUtils.insecure().nextAlphabetic( 10 );
509509
String command = lmName + "<-lm(" + datName + " ~ " + varNames + ", data=" + df + ", na.action=na.exclude)";
510510
voidEval( command );
511511

@@ -732,7 +732,7 @@ public void remove( String variableName ) {
732732
public Map<String, LinearModelSummary> rowApplyLinearModel( String dataMatrixVarName, String modelFormula,
733733
String[] factorNames ) {
734734

735-
String lmres = "lmlist." + RandomStringUtils.randomAlphanumeric( 10 );
735+
String lmres = "lmlist." + RandomStringUtils.insecure().nextAlphanumeric( 10 );
736736

737737
log.info( "Starting model fitting ..." );
738738

test/ubic/basecode/util/FileToolsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void setUp() throws Exception {
8686
tempoutput = File.createTempFile( "junkme", ".txt" );
8787

8888
tempdir = FileTools.createDir( System.getProperty( "java.io.tmpdir" ) + File.separatorChar + "junk.tmpdir."
89-
+ RandomStringUtils.randomAlphabetic( 10 ) );
89+
+ RandomStringUtils.insecure().nextAlphabetic( 10 ) );
9090

9191
}
9292

@@ -140,7 +140,7 @@ public void testCheckPathIsReadableFile() {
140140
@Test
141141
public void testCheckPathIsReadableFileNot() {
142142
try {
143-
FileTools.checkPathIsReadableFile( plain.getPath() + RandomStringUtils.randomNumeric( 10 ) );
143+
FileTools.checkPathIsReadableFile( plain.getPath() + RandomStringUtils.insecure().nextNumeric( 10 ) );
144144
fail( "Should have thrown an IOException" );
145145
} catch ( IOException e ) {
146146
// ok

0 commit comments

Comments
 (0)