You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ch...@apache.org on 2018/09/19 08:06:34 UTC
ignite git commit: IGNITE-9628: Java 9: ML module compilation failure
Repository: ignite
Updated Branches:
refs/heads/master 47715e0f5 -> feb1abcc8
IGNITE-9628: Java 9: ML module compilation failure
this closes #4780
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/feb1abcc
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/feb1abcc
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/feb1abcc
Branch: refs/heads/master
Commit: feb1abcc8b2583aa215ca93c4436d9aaef95b5f3
Parents: 47715e0
Author: dmitrievanthony <dm...@gmail.com>
Authored: Wed Sep 19 11:06:16 2018 +0300
Committer: Yury Babak <yb...@gridgain.com>
Committed: Wed Sep 19 11:06:16 2018 +0300
----------------------------------------------------------------------
.../ml/tree/randomforest/data/impurity/GiniHistogram.java | 3 +--
.../ml/tree/randomforest/data/impurity/MSEHistogram.java | 3 +--
.../ignite/ml/dataset/primitive/DatasetWrapperTest.java | 10 ++++++----
3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/feb1abcc/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/GiniHistogram.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/GiniHistogram.java b/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/GiniHistogram.java
index 80a07a7..3ca2a93 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/GiniHistogram.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/GiniHistogram.java
@@ -31,7 +31,6 @@ import org.apache.ignite.ml.dataset.feature.BucketMeta;
import org.apache.ignite.ml.dataset.feature.ObjectHistogram;
import org.apache.ignite.ml.dataset.impl.bootstrapping.BootstrappedVector;
import org.apache.ignite.ml.tree.randomforest.data.NodeSplit;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
/**
* Class contains implementation of splitting point finding algorithm based on Gini metric (see
@@ -84,7 +83,7 @@ public class GiniHistogram extends ImpurityHistogram implements ImpurityComputer
/** {@inheritDoc} */
@Override public Optional<Double> getValue(Integer bucketId) {
- throw new NotImplementedException();
+ throw new IllegalStateException("Gini histogram doesn't support 'getValue' method");
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/feb1abcc/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/MSEHistogram.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/MSEHistogram.java b/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/MSEHistogram.java
index e015e3f..c00b1c1 100644
--- a/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/MSEHistogram.java
+++ b/modules/ml/src/main/java/org/apache/ignite/ml/tree/randomforest/data/impurity/MSEHistogram.java
@@ -25,7 +25,6 @@ import org.apache.ignite.ml.dataset.feature.BucketMeta;
import org.apache.ignite.ml.dataset.feature.ObjectHistogram;
import org.apache.ignite.ml.dataset.impl.bootstrapping.BootstrappedVector;
import org.apache.ignite.ml.tree.randomforest.data.NodeSplit;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
/**
* Class contains implementation of splitting point finding algorithm based on MSE metric (see https://en.wikipedia.org/wiki/Mean_squared_error)
@@ -91,7 +90,7 @@ public class MSEHistogram extends ImpurityHistogram implements ImpurityComputer<
/** {@inheritDoc} */
@Override public Optional<Double> getValue(Integer bucketId) {
- throw new NotImplementedException();
+ throw new IllegalStateException("MSE histogram doesn't support 'getValue' method");
}
/** {@inheritDoc} */
http://git-wip-us.apache.org/repos/asf/ignite/blob/feb1abcc/modules/ml/src/test/java/org/apache/ignite/ml/dataset/primitive/DatasetWrapperTest.java
----------------------------------------------------------------------
diff --git a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/primitive/DatasetWrapperTest.java b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/primitive/DatasetWrapperTest.java
index 1ab76a0..2f004bf 100644
--- a/modules/ml/src/test/java/org/apache/ignite/ml/dataset/primitive/DatasetWrapperTest.java
+++ b/modules/ml/src/test/java/org/apache/ignite/ml/dataset/primitive/DatasetWrapperTest.java
@@ -61,7 +61,7 @@ public class DatasetWrapperTest {
public void testComputeWithCtx() {
doReturn(42).when(dataset).computeWithCtx(any(IgniteTriFunction.class), any(), any());
- Integer res = wrapper.computeWithCtx(mock(IgniteTriFunction.class), mock(IgniteBinaryOperator.class),
+ Integer res = (Integer) wrapper.computeWithCtx(mock(IgniteTriFunction.class), mock(IgniteBinaryOperator.class),
null);
assertEquals(42, res.intValue());
@@ -75,7 +75,7 @@ public class DatasetWrapperTest {
public void testComputeWithCtx2() {
doReturn(42).when(dataset).computeWithCtx(any(IgniteTriFunction.class), any(), any());
- Integer res = wrapper.computeWithCtx(mock(IgniteBiFunction.class), mock(IgniteBinaryOperator.class),
+ Integer res = (Integer) wrapper.computeWithCtx(mock(IgniteBiFunction.class), mock(IgniteBinaryOperator.class),
null);
assertEquals(42, res.intValue());
@@ -102,7 +102,8 @@ public class DatasetWrapperTest {
public void testCompute() {
doReturn(42).when(dataset).compute(any(IgniteBiFunction.class), any(), any());
- Integer res = wrapper.compute(mock(IgniteBiFunction.class), mock(IgniteBinaryOperator.class), null);
+ Integer res = (Integer) wrapper.compute(mock(IgniteBiFunction.class), mock(IgniteBinaryOperator.class),
+ null);
assertEquals(42, res.intValue());
@@ -115,7 +116,8 @@ public class DatasetWrapperTest {
public void testCompute2() {
doReturn(42).when(dataset).compute(any(IgniteBiFunction.class), any(IgniteBinaryOperator.class), any());
- Integer res = wrapper.compute(mock(IgniteFunction.class), mock(IgniteBinaryOperator.class), null);
+ Integer res = (Integer) wrapper.compute(mock(IgniteFunction.class), mock(IgniteBinaryOperator.class),
+ null);
assertEquals(42, res.intValue());