Fixed array out of bounds error

This commit is contained in:
Eyck Jentzsch 2019-09-11 12:21:46 +02:00
parent 3a6ed3ce7e
commit 04f011e82f
5 changed files with 5 additions and 5 deletions

View File

@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SWT widget
Bundle-SymbolicName: com.minres.scviewer.database.ui.swt
Bundle-Version: 2.0.1.qualifier
Bundle-Version: 2.0.2.qualifier
Bundle-Vendor: MINRES Technologies GmbH
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.swt;bundle-version="3.103.1",

View File

@ -8,5 +8,5 @@
<version>2.0.0-SNAPSHOT</version>
<relativePath>../com.minres.scviewer.parent</relativePath>
</parent>
<version>2.0.1-SNAPSHOT</version>
<version>2.0.2-SNAPSHOT</version>
</project>

View File

@ -72,7 +72,7 @@ public class TrackEntry {
}else {
// assign "random" color here, one name always results in the same color!
if( randomColors.length > 0 ) {
int index = streamValue.hashCode() % randomColors.length;
int index = Math.abs(streamValue.hashCode()) % randomColors.length;
result[0] = randomColors[index][0];
result[1] = randomColors[index][1];
}

View File

@ -10,7 +10,7 @@
<relativePath>../com.minres.scviewer.parent</relativePath>
</parent>
<artifactId>com.minres.scviewer.e4.product</artifactId>
<version>2.1.1-SNAPSHOT</version>
<version>2.1.2-SNAPSHOT</version>
<packaging>eclipse-repository</packaging>
<groupId>com.minres.scviewer</groupId>
<build>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<?pde version="3.5"?>
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.1.1.qualifier" useFeatures="false" includeLaunchers="true">
<product name="SCViewer" uid="scviewer" id="com.minres.scviewer.e4.application.product" application="org.eclipse.e4.ui.workbench.swt.E4Application" version="2.1.2.qualifier" useFeatures="false" includeLaunchers="true">
<configIni use="default">
</configIni>