You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hop.apache.org by ha...@apache.org on 2021/06/23 08:55:24 UTC
[incubator-hop] branch master updated: HOP-2994 Cleanup deprecated
code
This is an automated email from the ASF dual-hosted git repository.
hansva pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-hop.git
The following commit(s) were added to refs/heads/master by this push:
new b82ca97 HOP-2994 Cleanup deprecated code
new 0d590fb Merge pull request #893 from nadment/HOP-2994
b82ca97 is described below
commit b82ca9730fa28b5018f3b0fbb36e25f41fe936d3
Author: nadment <na...@gmail.com>
AuthorDate: Tue Jun 22 20:28:46 2021 +0200
HOP-2994 Cleanup deprecated code
---
.../java/org/apache/hop/core/row/IRowMeta.java | 14 -----------
.../main/java/org/apache/hop/core/row/RowMeta.java | 27 ----------------------
.../org/apache/hop/core/row/ValueDataUtil.java | 15 ------------
.../java/org/apache/hop/pipeline/PipelineMeta.java | 13 -----------
.../org/apache/hop/core/row/ValueDataUtilTest.java | 12 +++++-----
.../hop/workflow/actions/sftp/ActionSftp.java | 17 --------------
.../workflow/actions/sftp/ActionSftpDialog.java | 8 ++-----
.../hop/workflow/actions/http/ActionHttp.java | 19 ---------------
.../hop/workflow/actions/http/ActionHttpTest.java | 11 ++++-----
.../pgpdecryptfiles/ActionPGPDecryptFiles.java | 9 --------
.../ActionPGPDecryptFilesDialog.java | 2 +-
.../hop/workflow/actions/shell/ActionShell.java | 11 +--------
.../workflow/actions/shell/ActionShellDialog.java | 2 +-
.../workflow/actions/workflow/ActionWorkflow.java | 9 --------
.../googleanalytics/GoogleAnalyticsDialog.java | 3 +--
.../googleanalytics/GoogleAnalyticsMeta.java | 9 --------
.../calculator/CalculatorValueDataUtilTest.java | 12 +++++-----
.../combinationlookup/CombinationLookup.java | 3 +--
.../transforms/tableoutput/TableOutputMeta.java | 18 ---------------
.../hop/ui/core/dialog/EnterNumberDialog.java | 18 ---------------
20 files changed, 24 insertions(+), 208 deletions(-)
diff --git a/core/src/main/java/org/apache/hop/core/row/IRowMeta.java b/core/src/main/java/org/apache/hop/core/row/IRowMeta.java
index af31acd..5bbec8b 100644
--- a/core/src/main/java/org/apache/hop/core/row/IRowMeta.java
+++ b/core/src/main/java/org/apache/hop/core/row/IRowMeta.java
@@ -463,20 +463,6 @@ public interface IRowMeta extends Cloneable {
int compare(Object[] rowData1, Object[] rowData2) throws HopValueException;
/**
- * Calculate a hashCode of the content (not the index) of the data specified NOTE: This method
- * uses a simple XOR of the individual hashCodes which can result in a lot of collisions for
- * similar types of data (e.g. [A,B] == [B,A] and is not suitable for normal use. It is kept to
- * provide backward compatibility with CombinationLookup.lookupValues()
- *
- * @param rowData The data to calculate a hashCode with
- * @return the calculated hashCode
- * @throws HopValueException in case there is a data conversion error
- * @deprecated
- */
- @Deprecated
- int oldXORHashCode(Object[] rowData) throws HopValueException;
-
- /**
* Calculates a simple hashCode of all the native data objects in the supplied row. This method
* will return a better distribution of values for rows of numbers or rows with the same values in
* different positions. NOTE: This method performs against the native values, not the values
diff --git a/core/src/main/java/org/apache/hop/core/row/RowMeta.java b/core/src/main/java/org/apache/hop/core/row/RowMeta.java
index d0e7add..7a64d76 100644
--- a/core/src/main/java/org/apache/hop/core/row/RowMeta.java
+++ b/core/src/main/java/org/apache/hop/core/row/RowMeta.java
@@ -1038,33 +1038,6 @@ public class RowMeta implements IRowMeta {
}
/**
- * Calculate a hashCode of the content (not the index) of the data specified NOTE: This method uses a simple XOR of
- * the individual hashCodes which can result in a lot of collisions for similar types of data (e.g. [A,B] == [B,A] and
- * is not suitable for normal use. It is kept to provide backward compatibility with CombinationLookup.lookupValues()
- *
- * @param rowData The data to calculate a hashCode with
- * @return the calculated hashCode
- * @throws HopValueException in case there is a data conversion error
- * @deprecated
- */
- @Override
- @Deprecated
- public int oldXORHashCode( Object[] rowData ) throws HopValueException {
- int hash = 0;
- lock.readLock().lock();
- try {
- for ( int i = 0; i < size(); i++ ) {
- IValueMeta valueMeta = getValueMeta( i );
- hash ^= valueMeta.hashCode( rowData[ i ] );
- }
-
- return hash;
- } finally {
- lock.readLock().unlock();
- }
- }
-
- /**
* Calculates a simple hashCode of all the native data objects in the supplied row. This method will return a better
* distribution of values for rows of numbers or rows with the same values in different positions. NOTE: This method
* performs against the native values, not the values returned by ValueMeta. This means that if you have two rows with
diff --git a/core/src/main/java/org/apache/hop/core/row/ValueDataUtil.java b/core/src/main/java/org/apache/hop/core/row/ValueDataUtil.java
index e413caa..f91b0eb 100644
--- a/core/src/main/java/org/apache/hop/core/row/ValueDataUtil.java
+++ b/core/src/main/java/org/apache/hop/core/row/ValueDataUtil.java
@@ -317,21 +317,6 @@ public class ValueDataUtil {
}
/**
- * @deprecated Use {@link ValueDataUtil#createChecksum(IValueMeta, Object, String, boolean)}
- * instead
- */
- @Deprecated
- public static String createChecksum(IValueMeta metaA, Object dataA, String type) {
- String checksum = null;
- try {
- checksum = createChecksum(metaA, dataA, type, false);
- } catch (HopFileNotFoundException e) {
- // Ignore
- }
- return checksum;
- }
-
- /**
* @param metaA The IValueMeta
* @param dataA Filename
* @param type Algorithm to be used when computing the checksum (MD5 or SHA-1)
diff --git a/engine/src/main/java/org/apache/hop/pipeline/PipelineMeta.java b/engine/src/main/java/org/apache/hop/pipeline/PipelineMeta.java
index 565fa5a..757c83b 100644
--- a/engine/src/main/java/org/apache/hop/pipeline/PipelineMeta.java
+++ b/engine/src/main/java/org/apache/hop/pipeline/PipelineMeta.java
@@ -131,13 +131,6 @@ public class PipelineMeta extends AbstractMeta
/** The status of the pipeline. */
protected int pipelineStatus;
- /**
- * A table of named counters.
- *
- * @deprecated Moved to Pipeline
- */
- @Deprecated protected Hashtable<String, Counter> counters;
-
/** Indicators for changes in transforms, databases, hops, and notes. */
protected boolean changedTransforms, changedHops;
@@ -2466,12 +2459,6 @@ public class PipelineMeta extends AbstractMeta
return hasLoop(transformMeta, null);
}
- /** @deprecated use {@link #hasLoop(TransformMeta, TransformMeta)}} */
- @Deprecated
- public boolean hasLoop(TransformMeta transformMeta, TransformMeta lookup, boolean info) {
- return hasLoop(transformMeta, lookup, new HashSet<>());
- }
-
/**
* Checks for loop.
*
diff --git a/engine/src/test/java/org/apache/hop/core/row/ValueDataUtilTest.java b/engine/src/test/java/org/apache/hop/core/row/ValueDataUtilTest.java
index ec175ba..aa825c1 100644
--- a/engine/src/test/java/org/apache/hop/core/row/ValueDataUtilTest.java
+++ b/engine/src/test/java/org/apache/hop/core/row/ValueDataUtilTest.java
@@ -65,23 +65,23 @@ public class ValueDataUtilTest {
}
@Test
- public void checksumTest() {
+ public void checksumTest() throws Exception {
String path = getClass().getResource("txt-sample.txt").getPath();
- String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), path, "MD5");
+ String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), path, "MD5", false);
assertEquals("098f6bcd4621d373cade4e832627b4f6", checksum);
}
@Test
- public void checksumMissingFileTest() {
+ public void checksumMissingFileTest() throws Exception {
String nonExistingFile = "nonExistingFile";
- String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5");
+ String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5", false);
assertNull(checksum);
}
@Test
- public void checksumNullPathTest() {
+ public void checksumNullPathTest() throws Exception {
String nonExistingFile = "nonExistingFile";
- String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5");
+ String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5", false);
assertNull(checksum);
}
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java
index 9693c92..08c6494 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftp.java
@@ -290,23 +290,6 @@ public class ActionSftp extends ActionBase implements Cloneable, IAction {
return targetDirectory;
}
- /**
- * @deprecated use {@link #setCreateTargetFolder(boolean)} instead
- */
- @Deprecated
- public void setcreateTargetFolder( boolean createtargetfolder ) {
- this.createtargetfolder = createtargetfolder;
- }
-
- /**
- * @return createTargetFolder
- * @deprecated use {@link #isCreateTargetFolder()} instead.
- */
- @Deprecated
- public boolean iscreateTargetFolder() {
- return createtargetfolder;
- }
-
public boolean isCreateTargetFolder() {
return createtargetfolder;
}
diff --git a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftpDialog.java b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftpDialog.java
index b2a7a50..97d8ad6 100644
--- a/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftpDialog.java
+++ b/plugins/actions/ftp/src/main/java/org/apache/hop/workflow/actions/sftp/ActionSftpDialog.java
@@ -40,17 +40,13 @@ import org.eclipse.swt.custom.CTabItem;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
@@ -900,7 +896,7 @@ public class ActionSftpDialog extends ActionDialog implements IActionDialog {
wWildcard.setText(Const.NVL(action.getWildcard(), ""));
wRemove.setSelection(action.getRemove());
wAddFilenameToResult.setSelection(action.isAddToResult());
- wCreateTargetFolder.setSelection(action.iscreateTargetFolder());
+ wCreateTargetFolder.setSelection(action.isCreateTargetFolder());
wGetPrevious.setSelection(action.isCopyPrevious());
wUsePublicKey.setSelection(action.isUseKeyFile());
wKeyFilename.setText(Const.NVL(action.getKeyFilename(), ""));
@@ -941,7 +937,7 @@ public class ActionSftpDialog extends ActionDialog implements IActionDialog {
action.setWildcard(wWildcard.getText());
action.setRemove(wRemove.getSelection());
action.setAddToResult(wAddFilenameToResult.getSelection());
- action.setcreateTargetFolder(wCreateTargetFolder.getSelection());
+ action.setCreateTargetFolder(wCreateTargetFolder.getSelection());
action.setCopyPrevious(wGetPrevious.getSelection());
action.setUseKeyFile(wUsePublicKey.getSelection());
action.setKeyFilename(wKeyFilename.getText());
diff --git a/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java b/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
index 66f4c95..c84243e 100644
--- a/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
+++ b/plugins/actions/http/src/main/java/org/apache/hop/workflow/actions/http/ActionHttp.java
@@ -657,25 +657,6 @@ public class ActionHttp extends ActionBase implements Cloneable, IAction {
this.targetFilenameExtension = uploadFilenameExtension;
}
- /**
- * @return Returns the uploadFilenameExtension.
- * @deprecated Use {@link ActionHttp#getTargetFilenameExtension()} instead
- */
- @Deprecated
- public String getTargetFilenameExtention() {
- return targetFilenameExtension;
- }
-
- /**
- * @param uploadFilenameExtension The uploadFilenameExtension to set.
- * @deprecated Use {@link ActionHttp#setTargetFilenameExtension(String uploadFilenameExtension)}
- * instead
- */
- @Deprecated
- public void setTargetFilenameExtention(String uploadFilenameExtension) {
- this.targetFilenameExtension = uploadFilenameExtension;
- }
-
@Override
public List<ResourceReference> getResourceDependencies(
IVariables variables, WorkflowMeta workflowMeta) {
diff --git a/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java b/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
index 4d70377..478a72f 100644
--- a/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
+++ b/plugins/actions/http/src/test/java/org/apache/hop/workflow/actions/http/ActionHttpTest.java
@@ -35,7 +35,7 @@ import static org.junit.Assert.assertTrue;
public class ActionHttpTest {
@ClassRule public static RestoreHopEngineEnvironment env = new RestoreHopEngineEnvironment();
- private ActionHttp jobEntryHttp = new ActionHttp();
+ private ActionHttp actionHttp = new ActionHttp();
@BeforeClass
public static void beforeClass() throws HopException {
@@ -46,12 +46,11 @@ public class ActionHttpTest {
Encr.init( passwordEncoderPluginID );
}
- @SuppressWarnings( "deprecation" )
@Test
public void testDeprecatedTargetFilenameExtension() {
- jobEntryHttp.setTargetFilenameExtention( "txt" );
- assertTrue( "txt".equals( jobEntryHttp.getTargetFilenameExtension() ) );
- jobEntryHttp.setTargetFilenameExtension( "zip" );
- assertTrue( "zip".equals( jobEntryHttp.getTargetFilenameExtention() ) );
+ actionHttp.setTargetFilenameExtension( "txt" );
+ assertTrue( "txt".equals( actionHttp.getTargetFilenameExtension() ) );
+ actionHttp.setTargetFilenameExtension( "zip" );
+ assertTrue( "zip".equals( actionHttp.getTargetFilenameExtension() ) );
}
}
diff --git a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
index f87327e..6292288 100644
--- a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
+++ b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFiles.java
@@ -1207,15 +1207,6 @@ public class ActionPGPDecryptFiles extends ActionBase implements Cloneable, IAct
return destinationFolder;
}
- /**
- * @param gpgLocation
- * @deprecated use {@link #setGpgLocation(String)} instead
- */
- @Deprecated
- public void setGpgPLocation( String gpgLocation ) {
- this.gpgLocation = gpgLocation;
- }
-
public void setGpgLocation( String gpgLocation ) {
this.gpgLocation = gpgLocation;
}
diff --git a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFilesDialog.java b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFilesDialog.java
index 4fb0c98..ac4950b 100644
--- a/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFilesDialog.java
+++ b/plugins/actions/pgpfiles/src/main/java/org/apache/hop/workflow/actions/pgpdecryptfiles/ActionPGPDecryptFilesDialog.java
@@ -1651,7 +1651,7 @@ public class ActionPGPDecryptFilesDialog extends ActionDialog implements IAction
action.setDestinationFolder(wDestinationFolder.getText());
- action.setGpgPLocation(wGpgExe.getText());
+ action.setGpgLocation(wGpgExe.getText());
if (wIfMovedFileExists.getSelectionIndex() == 1) {
action.setIfMovedFileExists("overwrite_file");
diff --git a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
index a7929e7..0a53297 100644
--- a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
+++ b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShell.java
@@ -161,7 +161,7 @@ public class ActionShell extends ActionBase implements Cloneable, IAction {
throws HopXmlException {
try {
super.loadXml(entrynode);
- setFileName(XmlHandler.getTagValue(entrynode, "filename"));
+ setFilename(XmlHandler.getTagValue(entrynode, "filename"));
setWorkDirectory(XmlHandler.getTagValue(entrynode, "work_directory"));
argFromPrevious =
"Y".equalsIgnoreCase(XmlHandler.getTagValue(entrynode, "arg_from_previous"));
@@ -214,15 +214,6 @@ public class ActionShell extends ActionBase implements Cloneable, IAction {
script = null;
}
- /**
- * @param n
- * @deprecated use {@link #setFilename(String)} instead
- */
- @Deprecated
- public void setFileName(String n) {
- filename = n;
- }
-
public void setFilename(String n) {
filename = n;
}
diff --git a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShellDialog.java b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShellDialog.java
index 9cc3bff..ae840ae 100644
--- a/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShellDialog.java
+++ b/plugins/actions/shell/src/main/java/org/apache/hop/workflow/actions/shell/ActionShellDialog.java
@@ -740,7 +740,7 @@ public class ActionShellDialog extends ActionDialog implements IActionDialog {
mb.open();
return;
}
- action.setFileName(wFilename.getText());
+ action.setFilename(wFilename.getText());
action.setName(wName.getText());
action.setWorkDirectory(wWorkDirectory.getText());
diff --git a/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java b/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java
index 40f444d..39ef3d9 100644
--- a/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java
+++ b/plugins/actions/workflow/src/main/java/org/apache/hop/workflow/actions/workflow/ActionWorkflow.java
@@ -144,15 +144,6 @@ public class ActionWorkflow extends ActionBase implements Cloneable, IAction {
filename = n;
}
- /**
- * @return the filename
- * @deprecated use getFilename() instead.
- */
- @Deprecated
- public String getFileName() {
- return filename;
- }
-
@Override
public String getFilename() {
return filename;
diff --git a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsDialog.java b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsDialog.java
index 95a4436..2b5c1e0 100644
--- a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsDialog.java
+++ b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsDialog.java
@@ -55,7 +55,6 @@ import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Control;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
@@ -1036,7 +1035,7 @@ public class GoogleAnalyticsDialog extends BaseTransformDialog implements ITrans
meta.setGaProfileName(wGaProfile.getText());
meta.setGaAppName(wGaAppName.getText());
- meta.setOauthServiceAccount(wOauthAccount.getText());
+ meta.setOAuthServiceAccount(wOauthAccount.getText());
meta.setOAuthKeyFile(keyFilename.getText());
if (!Utils.isEmpty(wGaProfile.getText())) {
diff --git a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsMeta.java b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsMeta.java
index 1ffe1eb..9268034 100644
--- a/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsMeta.java
+++ b/plugins/tech/google/src/main/java/org/apache/hop/pipeline/transforms/googleanalytics/GoogleAnalyticsMeta.java
@@ -578,15 +578,6 @@ public class GoogleAnalyticsMeta extends BaseTransformMeta implements ITransform
}
/**
- * @deprecated use {@link #setOAuthServiceAccount(String)} instead
- * @param oauthServiceAccount
- */
- @Deprecated
- public void setOauthServiceAccount( String oauthServiceAccount ) {
- setOAuthServiceAccount( oauthServiceAccount );
- }
-
- /**
* If we use injection we can have different arrays lengths.
* We need synchronize them for consistency behavior with UI
*/
diff --git a/plugins/transforms/calculator/src/test/java/org/apache/hop/pipeline/transforms/calculator/CalculatorValueDataUtilTest.java b/plugins/transforms/calculator/src/test/java/org/apache/hop/pipeline/transforms/calculator/CalculatorValueDataUtilTest.java
index ae19fa2..095adcf 100644
--- a/plugins/transforms/calculator/src/test/java/org/apache/hop/pipeline/transforms/calculator/CalculatorValueDataUtilTest.java
+++ b/plugins/transforms/calculator/src/test/java/org/apache/hop/pipeline/transforms/calculator/CalculatorValueDataUtilTest.java
@@ -105,23 +105,23 @@ public class CalculatorValueDataUtilTest {
}
@Test
- public void checksumTest() {
+ public void checksumTest() throws Exception {
String path = getClass().getResource("txt-sample.txt").getPath();
- String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), path, "MD5");
+ String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), path, "MD5", true);
assertEquals("098f6bcd4621d373cade4e832627b4f6", checksum);
}
@Test
- public void checksumMissingFileTest() {
+ public void checksumMissingFileTest() throws Exception {
String nonExistingFile = "nonExistingFile";
- String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5");
+ String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5", false);
assertNull(checksum);
}
@Test
- public void checksumNullPathTest() {
+ public void checksumNullPathTest() throws Exception {
String nonExistingFile = "nonExistingFile";
- String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5");
+ String checksum = ValueDataUtil.createChecksum(new ValueMetaString(), nonExistingFile, "MD5", false);
assertNull(checksum);
}
diff --git a/plugins/transforms/combinationlookup/src/main/java/org/apache/hop/pipeline/transforms/combinationlookup/CombinationLookup.java b/plugins/transforms/combinationlookup/src/main/java/org/apache/hop/pipeline/transforms/combinationlookup/CombinationLookup.java
index df97aa7..e55f408 100644
--- a/plugins/transforms/combinationlookup/src/main/java/org/apache/hop/pipeline/transforms/combinationlookup/CombinationLookup.java
+++ b/plugins/transforms/combinationlookup/src/main/java/org/apache/hop/pipeline/transforms/combinationlookup/CombinationLookup.java
@@ -217,7 +217,6 @@ public class CombinationLookup extends BaseTransform<CombinationLookupMeta, Comb
return techKeyCreation == CREATION_METHOD_AUTOINC;
}
- @SuppressWarnings("deprecation")
private Object[] lookupValues(IRowMeta rowMeta, Object[] row) throws HopException {
Long valKey = null;
Long val_hash = null;
@@ -233,7 +232,7 @@ public class CombinationLookup extends BaseTransform<CombinationLookupMeta, Comb
}
if (meta.useHash()) {
- val_hash = new Long(data.hashRowMeta.oldXORHashCode(hashRow));
+ val_hash = new Long(data.hashRowMeta.hashCode(hashRow));
lookupRow[lookupIndex] = val_hash;
lookupIndex++;
}
diff --git a/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputMeta.java b/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputMeta.java
index a2b7611..7c2b4bd 100644
--- a/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputMeta.java
+++ b/plugins/transforms/tableoutput/src/main/java/org/apache/hop/pipeline/transforms/tableoutput/TableOutputMeta.java
@@ -257,24 +257,6 @@ public class TableOutputMeta extends BaseTransformMeta
this.tableName = tableName;
}
- /**
- * @return Returns the tablename.
- * @deprecated Use {@link #getTableName()}
- */
- @Deprecated
- public String getTablename() {
- return getTableName();
- }
-
- /**
- * @param tableName The tablename to set.
- * @deprecated Use {@link #setTableName(String)}
- */
- @Deprecated
- public void setTablename(String tableName) {
- setTableName(tableName);
- }
-
/** @return Returns the truncate table flag. */
public boolean truncateTable() {
return truncateTable;
diff --git a/ui/src/main/java/org/apache/hop/ui/core/dialog/EnterNumberDialog.java b/ui/src/main/java/org/apache/hop/ui/core/dialog/EnterNumberDialog.java
index ba85e20..39268a1 100644
--- a/ui/src/main/java/org/apache/hop/ui/core/dialog/EnterNumberDialog.java
+++ b/ui/src/main/java/org/apache/hop/ui/core/dialog/EnterNumberDialog.java
@@ -28,19 +28,13 @@ import org.apache.hop.ui.core.gui.WindowProperty;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
-import org.eclipse.swt.events.SelectionAdapter;
-import org.eclipse.swt.events.SelectionEvent;
-import org.eclipse.swt.events.ShellAdapter;
-import org.eclipse.swt.events.ShellEvent;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Dialog;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Listener;
import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
@@ -58,7 +52,6 @@ public class EnterNumberDialog extends Dialog {
protected Text wNumber;
private FormData fdlNumber, fdNumber, fdlCheckbox, fdCheckbox;
protected Button wOk, wCancel, wCheckbox;
- private Listener lsOk;
private boolean hideCancelButton;
protected Shell shell;
@@ -71,17 +64,6 @@ public class EnterNumberDialog extends Dialog {
private int width;
- /** @deprecated Use the CT without the <i>Props</i> parameter (at 2nd position) */
- @Deprecated
- public EnterNumberDialog(
- Shell parent, PropsUi props, int samples, String shellText, String lineText) {
- super(parent, SWT.NONE);
- this.props = props;
- this.samples = samples;
- this.shellText = shellText;
- this.lineText = lineText;
- }
-
public EnterNumberDialog(Shell parent, int samples, String shellText, String lineText) {
this(parent, samples, shellText, lineText, null);
}