Compare commits

..

28 Commits

Author SHA1 Message Date
AlixMetivier
b528a033fa Revert "feat(TBD-13810): add dynamic schema on thdfsinputformat components (#5442)"
This reverts commit a5df51204e.
2022-08-18 10:02:06 +02:00
jiezhang-tlnd
dc687f1a50 Revert "feat(TUP-35808)Generate module name from maven url (#5425)" (#5536)
This reverts commit 4c0b9c6f91.
2022-08-11 15:03:30 +08:00
hzhao-talendbj
14a610a72b fix(TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud (#5517)
* fix(TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud

* fix(TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud

* (TUP-36341): Unable to run DQ reports with subjob+joblet on a cloud
2022-08-09 16:21:30 +08:00
zyuan-talend
153a831b0b fix(TUP-35909):add missed context items for demo. (#5518) 2022-08-09 11:12:08 +08:00
hcyi
2bcc470833 fix(TUP-36012):CVE:com.h2database:h2:2.1.210 (#5454) 2022-08-09 11:00:19 +08:00
ypiel
88d10b08ec Chore: bump tck 1.47.0 on maintenance 8.0 (#5491)
* bump to component-runtime 1.47.1

Co-authored-by: Emmanuel GALLOIS <egallois@talend.com>
2022-08-08 13:42:28 +02:00
jiezhang-tlnd
5687315bd2 fix(TUP-36127)Upgrade commons-configuration to 2.8.0 (#5514)
* fix(TUP-36127)Upgrade commons-configuration to 2.8.0

* exclude commons-configuration2

* chore(TUP-36127) exclude commons-configuration2

* add dependency commons-text
2022-08-08 14:09:34 +08:00
wang wei
7cfce8de2a fix(TDI-48203): fix for microservice case (#5526) 2022-08-05 15:05:42 +08:00
Jane Ding
da7f173be2 feat(TUP-35644):tMap - possible simplified metrics to send to Pendo (#5524)
https://jira.talendforge.org/browse/TUP-35644
2022-08-05 10:08:26 +08:00
jiezhang-tlnd
f5a6347377 Add localized files (#5520) (#5523)
Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
2022-08-04 17:17:37 +08:00
Zhiwei Xue
e7ba1d5016 fix(TUP-36175):align bcprov-jdk15on to 1.70 (#5461) 2022-08-02 10:23:42 +08:00
zyuan-talend
ba1ee02e4e Add localized files (#5507)
* Add localized files (#5505)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5506)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: jzhangbj <jzhang@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-07-29 15:51:09 +08:00
Samuel ANTOINE
a5df51204e feat(TBD-13810): add dynamic schema on thdfsinputformat components (#5442)
* feat(TBD-13810): add dynamic schema on thdfsinputformat components
2022-07-29 07:26:46 +02:00
kjwang
dfe132d87e TUP-36242 jobs changing Hadoop metadata distribution after changing (#5484)
TUP-36242 jobs changing Hadoop metadata distribution after changing project/branch
https://jira.talendforge.org/browse/TUP-36242
2022-07-28 16:03:38 +08:00
jiezhang-tlnd
4c0b9c6f91 feat(TUP-35808)Generate module name from maven url (#5425)
* feat(TUP-35808)Generate module name from maven url

* handle for component and plugin.xml

* handle for component

* move to moduleNeeded.java

* format code

* feat(TUP-35808)Generate module name from maven url

* feat(TUP-35808)Generate module name from maven url

* add junits

* feat(TUP-35808)Generate module name from maven url

* add warning for incorrect module name

* add warning log for module name

* Use MODULE (name in plugin.xml) to build MVN_URI

* handle log

* handle mssql metedata
2022-07-27 18:38:21 +08:00
sbliu
16b6699cc9 feat(TUP-29393) replace nexus connection timeout with default connection timeout (#5475) 2022-07-27 17:42:01 +08:00
jiezhang-tlnd
3f57a592d1 fix(TUP-35446)CVE: org.apache.maven:maven-core:3.8.3 (#5446) 2022-07-27 11:25:19 +08:00
wang wei
74bc5ee66f fix(TDI-48203): [CVE]: routines.system.JSONObject(Object bean) use reflect to call method invoke, that's dangerous for evil script inject (#5426) 2022-07-27 09:29:03 +08:00
sbliu
6a0c96627f fix(TUP-36252) fix NPE for tos studio build job (#5482) 2022-07-26 14:25:12 +08:00
sbliu
ecf339a6ca chore(TUP-35865) upgrade wstx-asl-3.2.9.jar with wstx-core-asl-4.4.1 and stax2-api-4.2.1 (#5438) 2022-07-22 17:28:02 +08:00
Zhiwei Xue
dc5c3d0ec9 fix(TUP-18979):fix junit failure (#5492) 2022-07-22 16:15:34 +08:00
Jane Ding
503924aa75 Jding/add localized files 2022 07 21 (#5488)
* Add localized files (#5486)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

* Add localized files (#5487)

Co-authored-by: jenkins-git <jenkins-git@talend.com>

Co-authored-by: Alexiane Yvonet <ayvonet@talend.com>
Co-authored-by: jenkins-git <jenkins-git@talend.com>
Co-authored-by: tsasada-talend <51699524+tsasada-talend@users.noreply.github.com>
2022-07-21 17:43:39 +08:00
hzhao-talendbj
4ed461840a fix jackson cve (#5480) 2022-07-19 20:37:51 +08:00
hzhao-talendbj
cafa72f52a Revert "chore(TUP-35265): upgrade 'crypto-utils' jar in low level (#5372)" (#5476)
This reverts commit aed39722eb.
2022-07-19 16:25:28 +08:00
pyzhou
af62f01007 fix(TDI-48024): ResumeUtil performance issue (#5458)
* fix(TDI-48024): ResumeUtil performance issue

* NPE
2022-07-19 12:01:41 +08:00
zyuan-talend
5e4b9311a9 fix(TUP-36231,TUP31721): deploy libs from custom component. (#5468) (#5473) 2022-07-19 10:07:24 +08:00
Zhiwei Xue
a6164bf006 fix(TUP-18979):fix sync mapping file error of job project (#5470) 2022-07-18 16:55:14 +08:00
sbliu
24622068ec chore(TUP-35863) remove lower version of maven-settings (#5419)
* chore(TUP-35863) remove lower version of maven-settings
2022-07-18 09:44:36 +08:00
44 changed files with 226 additions and 86 deletions

View File

@@ -5,7 +5,7 @@
<copyright url="http://www.example.com/copyright">[Enter Copyright Description here.]</copyright>
<license url="http://www.example.com/license">[Enter License Description here.]</license>
<requires>
<import plugin="org.bouncycastle.bcprov" version="1.69.0" match="greaterOrEqual"/>
<import plugin="org.bouncycastle.bcprov" version="1.70.0" match="greaterOrEqual"/>
<import plugin="com.cedarsoftware.json-io" version="0.0.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-annotations" version="2.9.0" match="greaterOrEqual"/>
<import plugin="com.fasterxml.jackson.core.jackson-core" version="2.9.8" match="greaterOrEqual"/>

View File

@@ -1,18 +0,0 @@
// ============================================================================
//
// Copyright (C) 2006-2021 Talend Inc. - www.talend.com
//
// This source code is available under agreement available at
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt
//
// You should have received a copy of the agreement
// along with this program; if not, write to Talend SA
// 9 rue Pages 92150 Suresnes, France
//
// ============================================================================
package org.talend.commons.utils.network;
public interface ITalendNexusPrefConstants {
public static final String NEXUS_TIMEOUT = "NEXUS_TIMEOUT"; //$NON-NLS-1$
}

View File

@@ -55,6 +55,11 @@ public class NetworkUtil {
private static final int DEFAULT_NEXUS_TIMEOUT = 20000;// same as preference value
public static final String ORG_TALEND_DESIGNER_CORE = "org.talend.designer.core"; //$NON-NLS-1$
/*
* see ITalendCorePrefConstants.PERFORMANCE_TAC_READ_TIMEOUT
*/
private static final String PERFORMANCE_TAC_READ_TIMEOUT = "PERFORMANCE_TAC_READ_TIMEOUT"; //$NON-NLS-1$
private static final String PROP_DISABLEDSCHEMES_USE_DEFAULT = "talend.studio.jdk.http.auth.tunneling.disabledSchemes.useDefault";
@@ -149,10 +154,10 @@ public class NetworkUtil {
}
public static int getNexusTimeout() {
int timeout = DEFAULT_NEXUS_TIMEOUT;
int timeout = Integer.getInteger("nexus.timeout.min", DEFAULT_NEXUS_TIMEOUT);
try {
IEclipsePreferences node = InstanceScope.INSTANCE.getNode(ORG_TALEND_DESIGNER_CORE);
timeout = node.getInt(ITalendNexusPrefConstants.NEXUS_TIMEOUT, DEFAULT_NEXUS_TIMEOUT);
timeout = Math.max(timeout, node.getInt(PERFORMANCE_TAC_READ_TIMEOUT, 0) * 1000);
} catch (Throwable e) {
ExceptionHandler.process(e);
}

View File

@@ -93,6 +93,7 @@ import org.talend.core.context.CommandLineContext;
import org.talend.core.context.Context;
import org.talend.core.context.RepositoryContext;
import org.talend.core.exception.TalendInternalPersistenceException;
import org.talend.core.hadoop.BigDataBasicUtil;
import org.talend.core.hadoop.IHadoopDistributionService;
import org.talend.core.model.components.IComponentsService;
import org.talend.core.model.general.ILibrariesService;
@@ -2209,6 +2210,9 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
ExceptionHandler.process(e);
}
// init dynamic distirbution after `beforeLogon`, before loading libraries.
initDynamicDistribution(monitor);
// need to set m2
LoginTaskRegistryReader loginTaskRegistryReader = new LoginTaskRegistryReader();
ILoginTask[] allLoginTasks = loginTaskRegistryReader.getAllCommandlineTaskListInstance();
@@ -2404,6 +2408,18 @@ public final class ProxyRepositoryFactory implements IProxyRepositoryFactory {
throw e;
}
}
private void initDynamicDistribution(IProgressMonitor monitor) {
try {
if (BigDataBasicUtil.isDynamicDistributionLoaded(monitor)) {
BigDataBasicUtil.reloadAllDynamicDistributions(monitor);
} else {
BigDataBasicUtil.loadDynamicDistribution(monitor);
}
} catch (Exception e) {
ExceptionHandler.process(e);
}
}
// to fix the ops4j and m2e.core maven handler conflict issue TUP-31484
private void unregisterM2EServiceBeforeLogon() {

View File

@@ -56,14 +56,14 @@ public enum EDatabaseVersion4Drivers {
HSQLDB_SERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_SERVER, "hsqldb.jar")), //$NON-NLS-1$
HSQLDB_WEBSERVER(new DbVersion4Drivers(EDatabaseTypeName.HSQLDB_WEBSERVER, "hsqldb.jar")), //$NON-NLS-1$
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.210.jar")), //$NON-NLS-1$
H2(new DbVersion4Drivers(EDatabaseTypeName.H2, "h2-2.1.214.jar")), //$NON-NLS-1$
//
JAVADB_EMBEDED(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_EMBEDED, "derby.jar")), //$NON-NLS-1$
SQLITE(new DbVersion4Drivers(EDatabaseTypeName.SQLITE, "sqlitejdbc-v056.jar")), //$NON-NLS-1$
FIREBIRD(new DbVersion4Drivers(EDatabaseTypeName.FIREBIRD, "jaybird-full-2.1.1.jar")), //$NON-NLS-1$
TERADATA(new DbVersion4Drivers(EDatabaseTypeName.TERADATA,
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$ //$NON-NLS-2$
new String[] { "terajdbc4-17.10.00.27.jar" })), //$NON-NLS-1$
JAVADB_DERBYCLIENT(new DbVersion4Drivers(EDatabaseTypeName.JAVADB_DERBYCLIENT, "derbyclient.jar")), //$NON-NLS-1$
NETEZZA(new DbVersion4Drivers(EDatabaseTypeName.NETEZZA, "nzjdbc.jar")), //$NON-NLS-1$
INFORMIX(new DbVersion4Drivers(EDatabaseTypeName.INFORMIX, "ifxjdbc.jar")), //$NON-NLS-1$

View File

@@ -162,7 +162,7 @@ public class PendoTrackDataUtil {
OPEN_IN_APITester("Open in API Tester"),
OPEN_API_DOCUMENTATION("Open API Documentation"),
AUTOMAP("tMap Automap"),
TMAP("Studio tMap");
TMAP("tMap");
private String event;

View File

@@ -12,8 +12,6 @@
// ============================================================================
package org.talend.core.prefs;
import org.talend.commons.utils.network.ITalendNexusPrefConstants;
/**
* Core preferences. Detailled comment <br/>
*
@@ -187,8 +185,6 @@ public interface ITalendCorePrefConstants {
public static final String PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT = "PERFORMANCE_JAVA_PROCESS_CODE_FORMATE_TIMEOUT"; //$NON-NLS-1$
public static final String NEXUS_TIMEOUT = ITalendNexusPrefConstants.NEXUS_TIMEOUT;
public static final String NEXUS_REFRESH_FREQUENCY = "NEXUS_REFRESH_FREQUENCY"; //$NON-NLS-1$
/**

View File

@@ -402,7 +402,7 @@ repository.SAPIDoc=SAP iDoc
repository.SAPTable=SAP\u30C6\u30FC\u30D6\u30EB
repository.metadataSQLPatterns=SQL\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8
repository.metadataSQLPatterns.alias=SQLTemplates
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited.alias=DELIM
repository.metadataTable=\u30E1\u30BF\u30C7\u30FC\u30BF\u30B9\u30AD\u30FC\u30DE
repository.metadataColumn=\u30E1\u30BF\u30C7\u30FC\u30BF\u30AB\u30E9\u30E0

View File

@@ -48,6 +48,10 @@ public interface TalendProcessOptionConstants {
public static final int GENERATE_POM_NOT_CLEAR_CACHE = 1 << 11;
/**
* for DQ clean item
*/
public static final int GENERATE_NO_RESET_DQ = 1 << 12;
/**
* clean options
*/

View File

@@ -309,7 +309,7 @@ repository.metadataSAPConnections.alias=SAP
repository.SAPFunction=SAP\u30D5\u30A1\u30F3\u30AF\u30B7\u30E7\u30F3
repository.metadataSQLPatterns=SQL\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8
repository.metadataSQLPatterns.alias=SQLTemplates
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited.alias=DELIM
repository.metadataFileLdif=LDIF\u30D5\u30A1\u30A4\u30EB
repository.metadataFileLdif.alias=LDIF

View File

@@ -33,7 +33,7 @@ public class TalendDataCollectorPreferenceInitializer extends AbstractPreference
IPreferenceStore preferenceStore = CoreUIPlugin.getDefault().getPreferenceStore();
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
preferenceStore.setDefault(ITalendCorePrefConstants.DATA_COLLECTOR_UPLOAD_PERIOD, 5);
if(IRemoteService.get().isCloudConnection()) {
if(IRemoteService.get() != null && IRemoteService.get().isCloudConnection()) {
preferenceStore.setValue(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED, true);
}
}

View File

@@ -47,7 +47,7 @@ public class TalendDataCollectorPreferencePage extends FieldEditorPreferencePage
@Override
protected void createFieldEditors() {
if(!IRemoteService.get().isCloudConnection()) {
if(!(IRemoteService.get() != null && IRemoteService.get().isCloudConnection())) {
addField(new BooleanFieldEditor(ITalendCorePrefConstants.DATA_COLLECTOR_ENABLED,
Messages.getString("TalendDataCollectorPreferencePage_EnableCapture"), getFieldEditorParent())); //$NON-NLS-1$
}

View File

@@ -278,6 +278,19 @@ public class ProcessorUtilities {
needExportItemsForDQ = false;
}
public static void resetExportConfig(boolean noResetDq) {
interpreter = null;
codeLocation = null;
libraryPath = null;
exportConfig = false;
exportAsOSGI = false;
exportTimeStamp = null;
exportJobAsMicroService = false;
if (!noResetDq) {
needExportItemsForDQ = false;
}
}
public static String getInterpreter() {
return interpreter;
}

View File

@@ -113,7 +113,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@@ -84,7 +84,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>

View File

@@ -38,7 +38,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.68</version>
<version>1.70</version>
</dependency>
</dependencies>
<build>

View File

@@ -13,7 +13,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.eclipse.tycho</groupId>

View File

@@ -32,7 +32,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
<exclusions>
<exclusion>
<groupId>commons-io</groupId>
@@ -123,7 +123,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>

View File

@@ -11,7 +11,7 @@
<packaging>pom</packaging>
<properties>
<tcomp.version>1.46.1</tcomp.version>
<tcomp.version>1.47.1</tcomp.version>
<slf4j.version>1.7.32</slf4j.version>
<reload4j.version>1.2.19</reload4j.version>
</properties>

View File

@@ -29,8 +29,22 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>

View File

@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
@@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -100,7 +100,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -147,7 +147,7 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -199,12 +199,12 @@
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>3.8.3</version>
<version>3.8.6</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
@@ -228,6 +228,11 @@
<artifactId>junit</artifactId>
<version>4.13.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
@@ -254,7 +259,12 @@
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.8.0</version>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
@@ -267,6 +277,11 @@
<artifactId>plexus-utils</artifactId>
<version>3.0.24</version>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-settings</artifactId>
<version>3.8.3</version>
</dependency>
</dependencies>
</plugin>
</plugins>

View File

@@ -122,7 +122,7 @@ public class TalendMavenLaunchDelegate extends JavaLaunchDelegate implements Mav
this.extensionsSupport = MavenLaunchExtensionsSupport.create(configuration, launch);
log.info("" + getWorkingDirectory(configuration)); //$NON-NLS-1$
log.info(" mvn" + getProgramArguments(configuration, IRemoteService.get().isCloudConnection())); //$NON-NLS-1$
log.info(" mvn" + getProgramArguments(configuration, IRemoteService.get() == null ? false: IRemoteService.get().isCloudConnection())); //$NON-NLS-1$
this.programArguments = null;
extensionsSupport.configureSourceLookup(configuration, launch, monitor);

View File

@@ -241,7 +241,8 @@ public class BuildCacheManager {
property.getVersion(), true);
if (obj != null) {
IRunProcessService.get().generatePom(obj.getProperty().getItem(),
TalendProcessOptionConstants.GENERATE_POM_NOT_CLEAR_CACHE);
TalendProcessOptionConstants.GENERATE_POM_NOT_CLEAR_CACHE
| TalendProcessOptionConstants.GENERATE_NO_RESET_DQ);
}
}
}
@@ -331,7 +332,7 @@ public class BuildCacheManager {
private ITalendProcessJavaProject getTalendJobJavaProject(Property property) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
return service.getTalendJobJavaProject(property);
}
@@ -347,7 +348,7 @@ public class BuildCacheManager {
private boolean isBuildJob() {
if (GlobalServiceRegister.getDefault().isServiceRegistered(IRunProcessService.class)) {
IRunProcessService service = (IRunProcessService) GlobalServiceRegister.getDefault()
IRunProcessService service = GlobalServiceRegister.getDefault()
.getService(IRunProcessService.class);
return service.isExportConfig();
}

View File

@@ -140,8 +140,14 @@ public abstract class AbstractMavenCodesTemplatePom extends AbstractMavenGeneral
Exclusion jacksonExclusion = new Exclusion();
jacksonExclusion.setGroupId("com.fasterxml.jackson.core"); //$NON-NLS-1$
jacksonExclusion.setArtifactId("jackson-databind "); //$NON-NLS-1$
Exclusion configuration2Exclusion = new Exclusion();
configuration2Exclusion.setGroupId("org.apache.commons"); //$NON-NLS-1$
configuration2Exclusion.setArtifactId("commons-configuration2"); //$NON-NLS-1$
dependency.addExclusion(exclusion);
dependency.addExclusion(jacksonExclusion);
dependency.addExclusion(configuration2Exclusion);
}
existedDependencies.add(dependency);
}

View File

@@ -128,7 +128,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
if (ProcessUtils.isTestContainer(process)) {
if (GlobalServiceRegister.getDefault().isServiceRegistered(ITestContainerProviderService.class)) {
ITestContainerProviderService testService = (ITestContainerProviderService) GlobalServiceRegister.getDefault()
ITestContainerProviderService testService = GlobalServiceRegister.getDefault()
.getService(ITestContainerProviderService.class);
try {
property = testService.getParentJobItem(property.getItem()).getProperty();
@@ -231,7 +231,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
Dependency mavenCoreDep = new Dependency();
mavenCoreDep.setGroupId("org.apache.maven");
mavenCoreDep.setArtifactId("maven-core");
mavenCoreDep.setVersion("3.8.3");
mavenCoreDep.setVersion("3.8.6");
shade.getDependencies().add(guavaDep);
shade.getDependencies().add(codecDep);
@@ -454,6 +454,7 @@ public abstract class AbstractMavenProcessorPom extends CreateMavenBundleTemplat
*
* @param hasLoopDependency the hasLoopDependency to set
*/
@Override
public void setHasLoopDependency(boolean hasLoopDependency) {
this.hasLoopDependency = hasLoopDependency;
}

View File

@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry exported="true" kind="lib" path="lib/stax2-api-4.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/woodstox-core-asl-4.4.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/woden-api-1.0M9.jar"/>
<classpathentry exported="true" kind="lib" path="lib/axiom-api-1.2.13.jar"/>
<classpathentry exported="true" kind="lib" path="lib/axiom-impl-1.2.13.jar"/>
<classpathentry exported="true" kind="lib" path="lib/geronimo-stax-api_1.0_spec-1.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/httpcore-4.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/neethi-3.0.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/wstx-asl-3.2.9.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xmlschema-core-2.2.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>

View File

@@ -20,12 +20,13 @@ Bundle-ClassPath: lib/axiom-api-1.3.0.jar,
lib/geronimo-stax-api_1.0_spec-1.0.1.jar,
lib/mail-1.4.jar,
lib/neethi-3.0.1.jar,
lib/wstx-asl-3.2.9.jar,
lib/xmlschema-core-2.2.1.jar,
lib/woden-api-1.0M9.jar,
lib/axis2-codegen-1.8.0.jar,
lib/axis2-java2wsdl-1.8.0.jar,
lib/axis2-metadata-1.8.0.jar,
lib/woodstox-core-asl-4.4.1.jar,
lib/stax2-api-4.2.1.jar,
.
Export-Package: com.ctc.wstx.api,
com.ctc.wstx.cfg,

View File

@@ -80,6 +80,16 @@
<groupId>org.apache.ws.commons.axiom</groupId>
<artifactId>axiom-impl</artifactId>
<version>1.3.0</version>
</artifactItem>
<artifactItem>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.4.1</version>
</artifactItem>
<artifactItem>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>stax2-api</artifactId>
<version>4.2.1</version>
</artifactItem>
</artifactItems>
</configuration>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="lib" path="lib/h2-2.1.210.jar"/>
<classpathentry kind="lib" path="lib/h2-2.1.214.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -4,7 +4,7 @@ Bundle-Name: H2
Bundle-SymbolicName: org.talend.libraries.jdbc.h2
Bundle-Version: 8.0.1.qualifier
Bundle-ClassPath: .,
lib/h2-2.1.210.jar
lib/h2-2.1.214.jar
Export-Package: org.h2,
org.h2.api;uses:="org.h2.command.ddl,org.h2.table",
org.h2.bnf;uses:="org.h2.server.web",

View File

@@ -1,4 +1,4 @@
output.. = bin/
bin.includes = META-INF/,\
.,\
lib/h2-2.1.210.jar
lib/h2-2.1.214.jar

View File

@@ -28,7 +28,7 @@
<artifactItem>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.210</version>
<version>2.1.214</version>
</artifactItem>
</artifactItems>
</configuration>

View File

@@ -243,10 +243,39 @@ public class JSONObject {
*
* @param bean An object that has getter methods that should be used to make a JSONObject.
*/
@Deprecated
public JSONObject(Object bean) {
this();
populateMap(bean);
}
/**
* Construct a JSONObject from an Object using bean getters. It reflects on all of the public methods of the object.
* For each of the methods with no parameters and a name starting with <code>"get"</code> or <code>"is"</code>
* followed by an uppercase letter, the method is invoked, and a key and the value returned from the getter method
* are put into the new JSONObject.
*
* The key is formed by removing the <code>"get"</code> or <code>"is"</code> prefix. If the second remaining
* character is not upper case, then the first character is converted to lower case.
*
* For example, if an object has a method named <code>"getName"</code>, and if the result of calling
* <code>object.getName()</code> is <code>"Larry Fine"</code>, then the JSONObject will contain
* <code>"name": "Larry Fine"</code>.
*
* @param bean An object that has getter methods that should be used to make a JSONObject.
* @param expectedClass Bean must be the instance of this class, for safe to avoid evil script inject
*/
public JSONObject(Object bean, Class<?> expectedClass) {
this();
Class<?> clazz = bean.getClass();
if((clazz == expectedClass) || (expectedClass!=null && expectedClass.isAssignableFrom(clazz))) {
populateMap(bean);
return;
}
throw new JSONException("expectedClass doesn't match the bean or is null");
}
/**
* Construct a JSONObject from an Object, using reflection to find the public members. The resulting JSONObject's

View File

@@ -105,7 +105,7 @@ public class ResumeUtil {
csvWriter.write("stackTrace");// stackTrace
csvWriter.write("dynamicData");// dynamicData
csvWriter.endRecord();
csvWriter.flush();
csvWriter.flush(true);
}
// shared
sharedWriterMap.put(this.root_pid, this.csvWriter);
@@ -171,7 +171,7 @@ public class ResumeUtil {
csvWriter.write(item.stackTrace);// stackTrace
csvWriter.write(item.dynamicData);// dynamicData--->it is the 17th field. @see:feature:11296
csvWriter.endRecord();
csvWriter.flush();
csvWriter.flush(false);
fileLock.release();
}
// for test the order
@@ -193,6 +193,12 @@ public class ResumeUtil {
}
}
}
public void flush() {
if(csvWriter != null) {
csvWriter.flush(true);
}
}
// Util: invoke target check point
@Deprecated
@@ -353,13 +359,12 @@ public class ResumeUtil {
String str = out.toString();
return str;
}
// to support encrypt the password in the resume
public static String convertToJsonText(Object context, List<String> parametersToEncrypt) {
public static String convertToJsonText(Object context, Class<?> expectedClass, List<String> parametersToEncrypt) {
String jsonText = "";
try {
JSONObject firstNode = new JSONObject();
JSONObject secondNode = new JSONObject(context);
JSONObject secondNode = new JSONObject(context, expectedClass);
if (parametersToEncrypt != null) {
for (String parameterToEncrypt : parametersToEncrypt) {
if (secondNode.isNull(parameterToEncrypt)) {
@@ -379,9 +384,15 @@ public class ResumeUtil {
return jsonText;
}
// to support encrypt the password in the resume
@Deprecated
public static String convertToJsonText(Object context, List<String> parametersToEncrypt) {
return convertToJsonText(context, context == null ? null : context.getClass(), parametersToEncrypt);
}
// Util: convert the context variable to json style text.
// feature:11296
// @Deprecated
@Deprecated
public static String convertToJsonText(Object context) {
return convertToJsonText(context, null);
}
@@ -459,6 +470,8 @@ public class ResumeUtil {
USER_DEF_LOG,
JOB_ENDED;
}
/**
* this class is reference with CsvWriter.
@@ -503,7 +516,10 @@ public class ResumeUtil {
private String lineSeparator = System.getProperty("line.separator");
private int capibility = 2<<14; //32k
private int capibility = 2 << 22; //8M
private int FLUSH_FACTOR = 6 *1024 *1024; //6M
public SimpleCsvWriter(FileChannel channel) {
this.channel = channel;
@@ -534,10 +550,8 @@ public class ResumeUtil {
}
byte[] contentByte = content.getBytes();
if(contentByte.length > capibility - 1024) {
flush();
capibility = contentByte.length * 2;
buf = ByteBuffer.allocate(capibility);
if(contentByte.length > capibility - buf.position()) {
flush(true);
}
buf.put(contentByte);
@@ -562,18 +576,20 @@ public class ResumeUtil {
/**
* flush
*/
public void flush() {
try {
((Buffer) buf).flip();
channel.position(channel.size());
while(buf.hasRemaining()) {
channel.write(buf);
public void flush(boolean force) {
if(force || buf.position() > FLUSH_FACTOR) {
try {
((Buffer) buf).flip();
channel.position(channel.size());
while(buf.hasRemaining()) {
channel.write(buf);
}
channel.force(true);
((Buffer) buf).clear();
} catch (IOException e) {
e.printStackTrace();
}
channel.force(true);
((Buffer) buf).clear();
} catch (IOException e) {
e.printStackTrace();
}
}
}
/**

View File

@@ -510,10 +510,12 @@ InegerCellEditorListener.NumeralMessage=Valeur d'entr\u00E9e invalide
MetadataTalendTypeEditor.button.edit=Mo&difier
MetadataTalendTypeEditor.button.export=E&xporter
MetadataTalendTypeEditor.button.import=I&mporter
MetadataTalendTypeEditor.button.restore=R&estaurer
MetadataTalendTypeEditor.column1.Name=Fichier de mapping de m\u00E9tadonn\u00E9es
MetadataTalendTypeEditor.editMappingDialog.title=Modifier le fichier de mapping
MetadataTalendTypeEditor.error.message=Message d'erreur
MetadataTalendTypeEditor.fileIsImported=Le fichier a d\u00E9j\u00E0 \u00E9t\u00E9 import\u00E9.
MetadataTalendTypeEditor.fileOverwrite=Ce fichier existe d\u00E9j\u00E0. L'\u00E9craser\u00A0?
MetadataTalendTypeEditor.fileIsInvalid=Le fichier de m\u00E9tadonn\u00E9es import\u00E9 n'est pas valide.
MetadataTalendTypeEditor.fileNameStartRule=Le nom de fichier doit commencer par 'mapping_'.
ContextModeSelectPage.contextModes=Cr\u00E9er un contexte ou r\u00E9utiliser le contexte existant
@@ -549,5 +551,5 @@ MetadataTalendTypeEditor.confirmMessage=Voulez-vous remplacer les param\u00E8tre
PromptDialog.title=Ex\u00E9cuter le contexte {0} avec les param\u00E8tres\u00A0:
PromptDialog.stringTip=Le texte d'entr\u00E9e doit \u00EAtre entour\u00E9 par des guillemets.
PromptDialog.choose.title=Choisissez un contexte
PromptDialog.promptGroup.name=Variables \u00E0 compl\u00E9ter
PromptDialog.variablePrompts.name=Variables \u00E0 compl\u00E9ter
PromptDialog.context.environments.name=Environnement

View File

@@ -510,10 +510,12 @@ InegerCellEditorListener.NumeralMessage=\u5165\u529B\u5024\u304C\u7121\u52B9\u30
MetadataTalendTypeEditor.button.edit=\u7DE8\u96C6(&D)
MetadataTalendTypeEditor.button.export=\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8(&X)
MetadataTalendTypeEditor.button.import=\u30A4\u30F3\u30DD\u30FC\u30C8(&M)
MetadataTalendTypeEditor.button.restore=\u5FA9\u5143(&E)
MetadataTalendTypeEditor.column1.Name=\u30E1\u30BF\u30C7\u30FC\u30BF\u30DE\u30C3\u30D4\u30F3\u30B0\u30D5\u30A1\u30A4\u30EB
MetadataTalendTypeEditor.editMappingDialog.title=\u30DE\u30C3\u30D4\u30F3\u30B0\u30D5\u30A1\u30A4\u30EB\u3092\u7DE8\u96C6
MetadataTalendTypeEditor.error.message=\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8
MetadataTalendTypeEditor.fileIsImported=\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u65E2\u306B\u30A4\u30F3\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u3059\u3002
MetadataTalendTypeEditor.fileOverwrite=\u3053\u306E\u30D5\u30A1\u30A4\u30EB\u306F\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059\u3002\u4E0A\u66F8\u304D\u3057\u307E\u3059\u304B?
MetadataTalendTypeEditor.fileIsInvalid=\u30A4\u30F3\u30DD\u30FC\u30C8\u3055\u308C\u305F\u30E1\u30BF\u30C7\u30FC\u30BF\u30D5\u30A1\u30A4\u30EB\u304C\u7121\u52B9\u3067\u3059\u3002
MetadataTalendTypeEditor.fileNameStartRule=\u30D5\u30A1\u30A4\u30EB\u540D\u306F 'mapping_' \u3067\u59CB\u3081\u3066\u304F\u3060\u3055\u3044\u3002
ContextModeSelectPage.contextModes=\u65B0\u898F\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u4F5C\u6210\u3059\u308B\u304B\u3001\u65E2\u5B58\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3092\u518D\u4F7F\u7528

View File

@@ -510,10 +510,12 @@ InegerCellEditorListener.NumeralMessage=\u8F93\u5165\u503C\u65E0\u6548
MetadataTalendTypeEditor.button.edit=\u7F16\u8F91(&D)
MetadataTalendTypeEditor.button.export=\u5BFC\u51FA(&X)
MetadataTalendTypeEditor.button.import=\u5BFC\u5165 (&M)
MetadataTalendTypeEditor.button.restore=\u6062\u590D (&E)
MetadataTalendTypeEditor.column1.Name=\u5143\u6570\u636E\u6620\u5C04\u6587\u4EF6
MetadataTalendTypeEditor.editMappingDialog.title=\u7F16\u8F91\u6620\u5C04\u6587\u4EF6
MetadataTalendTypeEditor.error.message=\u9519\u8BEF\u6D88\u606F
MetadataTalendTypeEditor.fileIsImported=\u6B64\u6587\u4EF6\u5DF2\u88AB\u5BFC\u5165\u3002
MetadataTalendTypeEditor.fileOverwrite=\u6B64\u6587\u4EF6\u5DF2\u5B58\u5728\uFF0C\u8986\u76D6\u5417?
MetadataTalendTypeEditor.fileIsInvalid=\u5BFC\u5165\u7684\u5143\u6570\u636E\u6587\u4EF6\u65E0\u6548\u3002
MetadataTalendTypeEditor.fileNameStartRule=\u6587\u4EF6\u540D\u5FC5\u987B\u4EE5 'mapping_' \u5F00\u5934\u3002
ContextModeSelectPage.contextModes=\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u73AF\u5883\u6216\u91CD\u65B0\u4F7F\u7528\u73B0\u6709\u7684\u73AF\u5883

View File

@@ -14,7 +14,7 @@
<!-- Seems those 3 are not useful -->
<classloader
index="HIVE:HORTONWORKS:HDP_1_0:EMBEDDED"
libraries="hive-hbase-handler-0.9.0.jar;hbase-0.92.0.jar;hadoop-core-1.0.3.jar;commons-logging-1.0.4.jar;datanucleus-api-jdo-3.0.7.jar;datanucleus-core-3.0.9.jar;datanucleus-rdbms-3.0.8.jar;hive-builtins-0.9.0.jar;hive-exec-0.9.0_hdp.jar;hive-jdbc-0.9.0_hdp.jar;hive-metastore-0.9.0_hdp.jar;hive-service-0.9.0_hdp.jar;libfb303-0.7.0.jar;libthrift-0.7.0.jar;commons-lang-2.4.jar;antlr-runtime-3.0.1.jar;commons-dbcp-1.4.jar;commons-pool-1.5.4.jar;derby-10.4.2.0.jar;commons-configuration-1.6.jar;jdo2-api-2.3-ec.jar;reload4j-1.2.19.jar;slf4j-api-1.6.1.jar;slf4j-log4j12-1.6.1.jar;jackson-core-asl-1.8.8.jar;jackson-mapper-asl-1.8.8.jar">
libraries="hive-hbase-handler-0.9.0.jar;hbase-0.92.0.jar;hadoop-core-1.0.3.jar;commons-logging-1.0.4.jar;datanucleus-api-jdo-3.0.7.jar;datanucleus-core-3.0.9.jar;datanucleus-rdbms-3.0.8.jar;hive-builtins-0.9.0.jar;hive-exec-0.9.0_hdp.jar;hive-jdbc-0.9.0_hdp.jar;hive-metastore-0.9.0_hdp.jar;hive-service-0.9.0_hdp.jar;libfb303-0.7.0.jar;libthrift-0.7.0.jar;commons-lang-2.4.jar;antlr-runtime-3.0.1.jar;commons-dbcp-1.4.jar;commons-pool-1.5.4.jar;derby-10.4.2.0.jar;commons-configuration2-2.8.0.jar;jdo2-api-2.3-ec.jar;reload4j-1.2.19.jar;slf4j-api-1.6.1.jar;slf4j-log4j12-1.6.1.jar;jackson-core-asl-1.8.8.jar;jackson-mapper-asl-1.8.8.jar">
</classloader>
<classloader
index="HIVE:AMAZON_EMR:MapR_EMR:STANDALONE"

View File

@@ -67,7 +67,7 @@ public class TalendForgeRegistHelper {
IntroContentParser parser = new IntroContentParser(result);
Document dom = parser.getDocument();
if (dom != null) {
boolean cloud = IRemoteService.get().isCloudConnection();
boolean cloud = IRemoteService.get() != null && IRemoteService.get().isCloudConnection();
Element ele = dom.createElement("licensetype");
ele.setAttribute("id", "license_cloud");
ele.setAttribute("isCloud",""+cloud);

View File

@@ -17,5 +17,5 @@ repository.metadataGenericSchema=\u6C4E\u7528\u30B9\u30AD\u30FC\u30DE
repository.metadataGenericSchema.alias=GENERIC
repository.metadataDbConnection=DB\u63A5\u7D9A
repository.metadataConnections.alias=DB
repository.metadataFileDelimited=\u533A\u5207\u308A\u6587\u5B57\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited=\u533A\u5207\u308A\u4ED8\u304D\u30D5\u30A1\u30A4\u30EB
repository.metadataFileDelimited.alias=DELIM

Binary file not shown.

View File

@@ -24,10 +24,23 @@ public class JSONObjectTest extends TestCase {
}
}
public class EvilBean {
public int id;
public int getId() {
//do something evil
return this.id;
}
public EvilBean(int id) {
this.id = id;
}
}
@Test
public void test() throws JSONException {
Bean bean = new Bean(1,"wangwei");
JSONObject object = new JSONObject(bean);
JSONObject object = new JSONObject(bean, Bean.class);
assertEquals(false, object.isNull("id"));
assertEquals(1, object.get("id"));
@@ -36,4 +49,15 @@ public class JSONObjectTest extends TestCase {
assertEquals(false, object.isNull("Name"));
assertEquals("wangwei", object.get("Name"));
}
@Test
public void testScriptInject() {
EvilBean evil = new EvilBean(1);
try {
new JSONObject(evil, Bean.class);
fail();
} catch(JSONException e) {
}
}
}