Added serlization version id to avoid marshlling errors
+ *
+ * @author dushyantb, vikasrohit
+ * @version 1.2
*/
public class ProjectGroup implements Serializable {
+ /**
+ * Unique seriliazation version id
+ */
+ private static final long serialVersionUID = 652485342267757690L;
+
/**
* Represents group id
*/
diff --git a/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java b/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java
index 24fc73082..8a49ed21a 100644
--- a/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java
+++ b/components/project_management/src/java/main/com/topcoder/management/project/persistence/AbstractInformixProjectPersistence.java
@@ -502,7 +502,7 @@ public abstract class AbstractInformixProjectPersistence implements ProjectPersi
*
* @since 1.1.2
*/
- public static final long PUBLIC_SUBMITTER_TERMS_ID = 21303; // 21193 // 21173
+ public static final long PUBLIC_SUBMITTER_TERMS_ID = 21373; //21303 // 21193 // 21173
/**
*
@@ -532,7 +532,7 @@ public abstract class AbstractInformixProjectPersistence implements ProjectPersi
*
* @since 1.1.2
*/
- public static final long STANDARD_CCA_TERMS_ID = 21343; //21153; //21113; //20713;
+ public static final long STANDARD_CCA_TERMS_ID = 21374; //21343; //21153; //21113; //20713;
diff --git a/conf/ApplicationServer.properties b/conf/ApplicationServer.properties
index eb2ea5f6b..3ea626d8b 100644
--- a/conf/ApplicationServer.properties
+++ b/conf/ApplicationServer.properties
@@ -45,4 +45,7 @@ SSO_HASH_SECRET = @ApplicationServer.SSO_HASH_SECRET@
SSO_DOMAIN = @ApplicationServer.SSO_DOMAIN@
JWT_V3_COOKIE_KEY = @ApplicationServer.JWT_V3_COOKIE_KEY@
-JWT_COOKIE_KEY = @ApplicationServer.JWT_COOKIE_KEY@
\ No newline at end of file
+JWT_COOKIE_KEY = @ApplicationServer.JWT_COOKIE_KEY@
+
+TOPCODER_CONNECT_URL=@TopcoderConnectUrl@
+TOPCODER_NEW_AUTH_URL=@TopcoderNewAuthUrl@
diff --git a/conf/phase_templates/TCSTemplate_Studio.xml b/conf/phase_templates/TCSTemplate_Studio.xml
index c249bc867..bb5320763 100644
--- a/conf/phase_templates/TCSTemplate_Studio.xml
+++ b/conf/phase_templates/TCSTemplate_Studio.xml
@@ -8,8 +8,6 @@
-
-
@@ -17,14 +15,7 @@
-
-
-
-
-
-
-
diff --git a/services/contest_service_facade/build.version b/services/contest_service_facade/build.version
index c10ca44fe..e08a51751 100644
--- a/services/contest_service_facade/build.version
+++ b/services/contest_service_facade/build.version
@@ -4,6 +4,6 @@ component.distfilename=contest_service_facade
component.package=com.topcoder.service.facade.contest
component.packagedir=com/topcoder/service/facade/contest
component.version.major=1
-component.version.minor=1
+component.version.minor=2
component.version.micro=0
component.version.build=1
diff --git a/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ContestServiceFacade.java b/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ContestServiceFacade.java
index 70d9ce871..6002cbbf4 100644
--- a/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ContestServiceFacade.java
+++ b/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ContestServiceFacade.java
@@ -595,7 +595,33 @@ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject,SoftwareCom
*/
public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
long tcDirectProjectId, Date multiRoundEndDate, Date endDate) throws ContestServiceException, PermissionServiceException;
-
+
+ /**
+ *
+ * Creates a new SoftwareCompetition in the persistence.
+ *
+ * Updated for Version 1.0.1 - BUGR-2185: For development contests, if asset (or component) exists from design
+ * contests then that is used to create a new contest. Otherwise a new asset is also created. Updated for Version1.5
+ * the code is refactored by the logic: 1. check the permission 2. update or create the asset 3. set default
+ * resources 4. create project 5. prepare the return value 6. persist the eligility
+ *
+ * Update in v1.5.1: add parameter TCSubject which contains the security info for current user.
+ *
+ * @param tcSubject TCSubject instance contains the login security info for the current user
+ * @param contest the SoftwareCompetition to create as a contest
+ * @param tcDirectProjectId the TC direct project id. a long providing the ID of a client the new
+ * competition belongs to.
+ * @param multiRoundEndDate the end date for the multiround phase. No multiround if it's null.
+ * @param endDate the end date for submission phase. Can be null if to use default.
+ * @param skipForum true if skip forum creation
+ * @return the created SoftwareCompetition as a contest
+ * @throws IllegalArgumentException if the input argument is invalid.
+ * @throws ContestServiceException if an error occurs when interacting with the service layer.
+ * @since 1.6.4
+ */
+ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
+ long tcDirectProjectId, Date multiRoundEndDate, Date endDate, boolean skipForum) throws ContestServiceException, PermissionServiceException;
+
/**
*
* Creates a new SoftwareCompetition in the persistence.
@@ -614,7 +640,28 @@ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCo
*/
public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
long tcDirectProjectId, Date regEndDate, Date multiRoundEndDate, Date endDate) throws ContestServiceException, PermissionServiceException;
-
+
+ /**
+ *
+ * Creates a new SoftwareCompetition in the persistence.
+ *
+ *
+ * @param tcSubject TCSubject instance contains the login security info for the current user
+ * @param contest the SoftwareCompetition to create as a contest
+ * @param tcDirectProjectId the TC direct project id. a long providing the ID of a client the new
+ * competition belongs to.
+ * @param regEndDate the registration end date
+ * @param multiRoundEndDate the end date for the multiround phase. No multiround if it's null.
+ * @param endDate the end date for submission phase. Can be null if to use default.
+ * @param skipForum true if no need to create the forum
+ * @return the created SoftwareCompetition as a contest
+ * @throws IllegalArgumentException if the input argument is invalid.
+ * @throws ContestServiceException if an error occurs when interacting with the service layer.
+ */
+ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
+ long tcDirectProjectId, Date regEndDate, Date multiRoundEndDate, Date endDate, boolean skipForum) throws ContestServiceException, PermissionServiceException;
+
+
/**
*
* BURG-1716: We need to add a method to get software contest by project id,
@@ -685,7 +732,7 @@ public SoftwareCompetition updateSoftwareContest(TCSubject tcSubject,
*/
public SoftwareCompetition updateSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
long tcDirectProjectId, Date multiRoundEndDate, Date endDate) throws ContestServiceException, PermissionServiceException;
-
+
/**
*
* Updates a SoftwareCompetition in the persistence.
diff --git a/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ejb/ContestServiceFacadeBean.java b/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ejb/ContestServiceFacadeBean.java
index a955bcd94..49928ae8d 100644
--- a/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ejb/ContestServiceFacadeBean.java
+++ b/services/contest_service_facade/src/java/main/com/topcoder/service/facade/contest/ejb/ContestServiceFacadeBean.java
@@ -2354,6 +2354,22 @@ private XMLGregorianCalendar getXMLGregorianCalendar(Date date) {
}
}
+ /**
+ *
+ * Adds the specified number of minutes to the given date and returns the result.
+ *
+ *
+ * @param date The Date to which to add the given minutes amount
+ * @param minutes The number of minutes to add to the given date (Can be negative)
+ * @return The resulting date = input date + number of minutes
+ */
+ private Date addMinutesToDate(Date date, int minutes) {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(date);
+ cal.add(Calendar.MINUTE, minutes);
+ return cal.getTime();
+ }
+
/**
*
* Processes the contest sale.
@@ -3619,7 +3635,56 @@ private void checkContestBillingAccount(long billingAccountId, long directProjec
public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
long tcDirectProjectId, Date multiRoundEndDate, Date endDate)
throws ContestServiceException, PermissionServiceException {
- return createSoftwareContest(tcSubject, contest, tcDirectProjectId, null, null, null);
+ return createSoftwareContest(tcSubject, contest, tcDirectProjectId, null, null, false);
+ }
+
+ /**
+ *
+ * Creates a new SoftwareCompetition in the persistence.
+ *
+ * Updated for Version 1.0.1 - BUGR-2185: For development contests, if asset (or
+ * component) exists from design contests then that is used to create a new
+ * contest. Otherwise a new asset is also created. Updated for Version1.5 the
+ * code is refactored by the logic: 1. check the permission 2. update or create
+ * the asset 3. set default resources 4. create project 5. prepare the return
+ * value 6. persist the eligility
+ *
+ * Update in v1.5.1: add parameter TCSubject which contains the security info
+ * for current user.
+ *
+ *
+ *
+ * Update in v1.8.3: Add handling of auto creation of bug hunt for assembly
+ * competition. If the assembly contest has bugHuntProjectHeader set and the
+ * properties not empty in bugHuntProjectHeader. A bug hunt contest is
+ * automatically created. The bug hunt contest will - have copilot inserted as
+ * reviewer (if exists) - use the start date of approval date as the start date
+ * and producation date of bug hunt contest. - add a "Bug Race For" link between
+ * the bug race contest and assembly contest
+ *
+ *
+ * @param tcSubject TCSubject instance contains the login security info
+ * for the current user
+ * @param contest the SoftwareCompetition to create as a
+ * contest
+ * @param tcDirectProjectId the TC direct project id. a long
+ * providing the ID of a client the new competition
+ * belongs to.
+ * @param multiRoundEndDate the end date for the multiround phase. No multiround
+ * if it's null.
+ * @param endDate the end date for submission phase. Can be null if to
+ * use default.
+ * @param skipForum true if no need to create the forum
+ * @return the created SoftwareCompetition as a contest
+ * @throws IllegalArgumentException if the input argument is invalid.
+ * @throws ContestServiceException if an error occurs when interacting with the
+ * service layer.
+ * @since 1.6.6
+ */
+ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
+ long tcDirectProjectId, Date multiRoundEndDate, Date endDate, boolean skipForum)
+ throws ContestServiceException, PermissionServiceException {
+ return createSoftwareContest(tcSubject, contest, tcDirectProjectId, null, null, null, skipForum);
}
/**
@@ -3647,8 +3712,41 @@ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCo
public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
long tcDirectProjectId, Date regEndDate, Date multiRoundEndDate, Date endDate)
throws ContestServiceException, PermissionServiceException {
- logger.debug("createSoftwareContest with information : [tcSubject = " + tcSubject.getUserId()
- + ", tcDirectProjectId =" + tcDirectProjectId + ", multiRoundEndDate = " + multiRoundEndDate + "]");
+ return createSoftwareContest(
+ tcSubject, contest, tcDirectProjectId, regEndDate, multiRoundEndDate, endDate, false);
+ }
+
+ /**
+ *
+ * Creates a new SoftwareCompetition in the persistence.
+ *
+ *
+ * @param tcSubject TCSubject instance contains the login security info
+ * for the current user
+ * @param contest the SoftwareCompetition to create as a
+ * contest
+ * @param tcDirectProjectId the TC direct project id. a long
+ * providing the ID of a client the new competition
+ * belongs to.
+ * @param regEndDate the registration end date
+ * @param multiRoundEndDate the end date for the multiround phase. No multiround
+ * if it's null.
+ * @param endDate the end date for submission phase. Can be null if to
+ * use default.
+ * @param skipForum true if no need to create the forum
+ *
+ * @return the created SoftwareCompetition as a contest
+ * @throws IllegalArgumentException if the input argument is invalid.
+ * @throws ContestServiceException if an error occurs when interacting with the
+ * service layer.
+ */
+ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCompetition contest,
+ long tcDirectProjectId, Date regEndDate, Date multiRoundEndDate, Date endDate, boolean skipForum)
+ throws ContestServiceException, PermissionServiceException {
+ logger.info("createSoftwareContest with information : [tcSubject = " + tcSubject.getUserId()
+ + ", tcDirectProjectId =" + tcDirectProjectId
+ + ", multiRoundEndDate = " + multiRoundEndDate
+ + ", skipForum = " + String.valueOf(skipForum) + "]");
try {
ExceptionUtils.checkNull(contest, null, null, "The contest to create is null.");
@@ -3699,7 +3797,7 @@ public SoftwareCompetition createSoftwareContest(TCSubject tcSubject, SoftwareCo
checkBillingProjectCCA(contest);
// update the AssetDTO and update corresponding properties
- createUpdateAssetDTO(tcSubject, contest);
+ createUpdateAssetDTO(tcSubject, contest, skipForum);
com.topcoder.management.resource.Resource[] contestResources = createContestResources(tcSubject, contest,
billingProjectId, requireApproval);
@@ -3999,10 +4097,11 @@ private boolean shouldAutoCreateBugHuntContest(SoftwareCompetition contest) {
* @param tcSubject TCSubject instance contains the login security info for the
* current user
* @param contest the contest
+ * @param skipForum true if no need to create forum
* @throws EntityNotFoundException if any error occurs
* @throws com.topcoder.catalog.service.PersistenceException if any error occurs
*/
- private void createUpdateAssetDTO(TCSubject tcSubject, SoftwareCompetition contest) throws EntityNotFoundException,
+ private void createUpdateAssetDTO(TCSubject tcSubject, SoftwareCompetition contest, boolean skipForum) throws EntityNotFoundException,
com.topcoder.catalog.service.PersistenceException, DAOException, ConfigManagerException {
// check if it is going to create development contest
boolean isDevContest = isDevContest(contest);
@@ -4039,19 +4138,25 @@ else if (isDevContest) {
}
long forumId = 0;
// create forum
- if (createForum) {
+ if (createForum && !skipForum) {
if (useExistingAsset && assetDTO.getForum() != null) {
forumId = assetDTO.getForum().getJiveCategoryId();
} else {
- if (!isStudio(contest)) {
- // software contest
- forumId = createForum(tcSubject, assetDTO, tcSubject.getUserId(),
- contest.getProjectHeader().getProjectCategory().getId());
+ if(isPrivateProject(contest)) { // no forum to be created for private tasks
+ logger.debug("Skip forum creation for private task: "+assetDTO.getName());
} else {
- // studio contest
- forumId = createStudioForum(assetDTO.getName(), tcSubject.getUserId());
+ if (!isStudio(contest)) {
+ // software contest
+ forumId = createForum(tcSubject, assetDTO, tcSubject.getUserId(),
+ contest.getProjectHeader().getProjectCategory().getId());
+ } else {
+ // studio contest
+ forumId = createStudioForum(assetDTO.getName(), tcSubject.getUserId());
+ }
}
}
+ } else {
+ logger.info("Skip forum creation");
}
// if forum created
@@ -4203,10 +4308,8 @@ else if (isDevContest) {
// "0");
// }
- if (forumId > 0) {
- contest.getProjectHeader().setProperty(ProjectPropertyType.DEVELOPER_FORUM_ID_PROJECT_PROPERTY_KEY,
+ contest.getProjectHeader().setProperty(ProjectPropertyType.DEVELOPER_FORUM_ID_PROJECT_PROPERTY_KEY,
String.valueOf(forumId));
- }
contest.getProjectPhases().setStartDate(getDate(productionDate));
}
@@ -5516,8 +5619,9 @@ public Set updatePreRegister(TCSubject tcSubject, SoftwareCompetition cont
removedUsers = uploadExternalServices.removeSubmitters(contest.getId(), removedUsers,
String.valueOf(tcSubject.getUserId()));
- // remove forum
- if (createForum) {
+ // remove forum user permissions for public projects.
+ // private tasks do not have forums created
+ if (createForum && !isPrivateProject(contest)) {
try {
forumId = contest.getAssetDTO().getForum().getJiveCategoryId();
forum = getSoftwareForums();
@@ -5536,7 +5640,7 @@ public Set updatePreRegister(TCSubject tcSubject, SoftwareCompetition cont
for (Long member : preRegisterMembers) {
try {
this.addSubmitter(tcSubject, contest.getId(), member);
- if (createForum) {
+ if (createForum && !isPrivateProject(contest)) {
forum.assignRole(member, userRoleId);
}
addedUsers.add(member);
@@ -5966,7 +6070,7 @@ private long createStudioForum(String name, long userId) {
logger.error("*** Could not create a studio forum for " + name);
logger.error(e);
}
- return -1;
+ return 0;
}
/**
@@ -6014,7 +6118,7 @@ public long createForum(TCSubject tcSubject, AssetDTO asset, long userId, long p
logger.error("*** Could not create a forum for " + asset.getName());
logger.error(e);
- return forumId;
+ return 0;
}
}
@@ -7737,10 +7841,8 @@ else if (autoDevCreating && isDevContest) {
dto.getForum().setCompVersion(null);
}
- if (forumId > 0) {
- contest.getProjectHeader().setProperty(ProjectPropertyType.DEVELOPER_FORUM_ID_PROJECT_PROPERTY_KEY,
+ contest.getProjectHeader().setProperty(ProjectPropertyType.DEVELOPER_FORUM_ID_PROJECT_PROPERTY_KEY,
String.valueOf(forumId));
- }
contest.setStartDate(getDate(startDate));
// 3.create the project
@@ -9862,25 +9964,30 @@ public void closeSoftwareContest(TCSubject tcSubject, long projectId, long winne
DataHandler dataHandler = new DataHandler(new FileDataSource(mockSubmissionFilePath + mockSubmissionFileName));
long submissionId = uploadSubmission(winnerId, contest.getId(), mockSubmissionFileName, dataHandler);
- // close submission and review phase
+ Date currentDate = new Date();
+ // subtract one minute from the current date
+ // this will be used to set the registration start/end dates
+ Date oneMinuteEarlier = addMinutesToDate(currentDate, -1);
+
+ // close registration, submission and review phases
com.topcoder.project.phases.Phase submissionPhase = null;
com.topcoder.project.phases.Phase reviewPhase = null;
for (com.topcoder.project.phases.Phase phase : phases) {
if (PROJECT_SUBMISSION_PHASE_NAME.equals(phase.getPhaseType().getName())) {
if (phaseNeedToUpdate && !phaseHasClosed) {
// submission is scheduled
- phase.setActualStartDate(new Date());
- phase.setActualEndDate(new Date());
+ phase.setActualStartDate(currentDate);
+ phase.setActualEndDate(currentDate);
} else if (!phaseNeedToUpdate) {
// phase already open
- phase.setActualEndDate(new Date());
+ phase.setActualEndDate(currentDate);
}
phase.setPhaseStatus(PhaseStatus.CLOSED);
submissionPhase = phase;
} else if (PROJECT_REVIEW_PHASE_NAME.equals(phase.getPhaseType().getName())
|| PROJECT_ITERATIVE_REVIEW_PHASE_NAME.equals(phase.getPhaseType().getName())) {
if (phase.getPhaseStatus().getId() == PhaseStatus.SCHEDULED.getId()) {
- phase.setActualStartDate(new Date());
+ phase.setActualStartDate(currentDate);
phase.setScheduledEndDate(null);
phase.setScheduledStartDate(phase.calcStartDate());
phase.setScheduledEndDate(phase.calcEndDate());
@@ -9890,6 +9997,21 @@ public void closeSoftwareContest(TCSubject tcSubject, long projectId, long winne
// skiping closed iterative review
reviewPhase = phase;
}
+ } else if (PROJECT_REGISTRATION_PHASE_NAME.equals(phase.getPhaseType().getName())) {
+ if (phase.getActualStartDate() != null) {
+ // The registration phase is already started, we only need to set the end date if not set already
+ // The actual end date is set to one minute earlier than the submission phase
+ // This will ensure that the phases are shown in the correct order in Online Review
+ if(phase.getActualEndDate() == null ) {
+ phase.setActualEndDate(oneMinuteEarlier);
+ }
+ } else {
+ // The registration phase is not opened yet (start date is in the future)
+ phase.setActualStartDate(oneMinuteEarlier);
+ phase.setActualEndDate(oneMinuteEarlier);
+ }
+ // Set the registration status to closed
+ phase.setPhaseStatus(PhaseStatus.CLOSED);
}
}
projectPhases.setPhases(new HashSet(Arrays.asList(phases)));
diff --git a/src/java/main/com/topcoder/direct/services/configs/ServerConfiguration.java b/src/java/main/com/topcoder/direct/services/configs/ServerConfiguration.java
index b678e1b92..79e146711 100644
--- a/src/java/main/com/topcoder/direct/services/configs/ServerConfiguration.java
+++ b/src/java/main/com/topcoder/direct/services/configs/ServerConfiguration.java
@@ -58,4 +58,14 @@ public class ServerConfiguration extends ApplicationServer {
public static String JWT_V3_COOKIE_KEY = bundle.getProperty("JWT_V3_COOKIE_KEY", "v3jwt");
public static String JWT_COOKIE_KEY = bundle.getProperty("JWT_COOKIE_KEY", "tcjwt");
+
+ /**
+ * The Topcoder Connect URL
+ */
+ public static String TOPCODER_CONNECT_URL = bundle.getProperty("TOPCODER_CONNECT_URL", "https://connect.topcoder.com");
+
+ /**
+ * Topcoder - New Auth URL to refresh token
+ */
+ public static String TOPCODER_NEW_AUTH_URL = bundle.getProperty("TOPCODER_NEW_AUTH_URL", "");
}
diff --git a/src/java/main/com/topcoder/direct/services/view/action/contest/launch/GetContestAction.java b/src/java/main/com/topcoder/direct/services/view/action/contest/launch/GetContestAction.java
index d1c95484a..6d2430238 100644
--- a/src/java/main/com/topcoder/direct/services/view/action/contest/launch/GetContestAction.java
+++ b/src/java/main/com/topcoder/direct/services/view/action/contest/launch/GetContestAction.java
@@ -474,7 +474,7 @@ protected void executeAction() throws Exception {
List projectGroups = DirectUtils.getGroupIdAndName(
softwareCompetition.getProjectHeader().getGroups());
- if (this.type == TYPE.CONTEST_JSON) {
+ if (projectGroups != null && this.type == TYPE.CONTEST_JSON) {
// get v5 id of groups
Set
+ *
+ *
* Thread safety: Technically this class is NOT thread safe since it has mutable states, but the intended
* usage of the mutators is for IoC injection and thus we expect for these values not to be changed after
* initialization. Thus this class can be considered as thread-safe conditional in an IoC injection usage of
@@ -88,7 +97,7 @@
*
*
* @author AleaActaEst, TCSDEVELOPER, duxiaoyang
- * @version 1.1
+ * @version 1.2
*/
@SuppressWarnings("serial")
public class CustomFormatAJAXResult implements Result {
@@ -177,6 +186,8 @@ public class CustomFormatAJAXResult implements Result {
*/
private boolean enabledGzip = false;
+ private Logger logger = Logger.getLogger(CustomFormatAJAXResult.class);
+
/**
*
* Default constructor.
@@ -290,7 +301,7 @@ public void execute(ActionInvocation invocation) throws AJAXDataPreProcessingExc
* @throws IOException
* if any io error happens
*/
- private static void writeDataAndClose(InputStream in, OutputStream out) throws IOException {
+ private void writeDataAndClose(InputStream in, OutputStream out) throws IOException {
try {
// Write input stream to output stream
byte[] buf = new byte[BUFFER_SIZE];
@@ -300,11 +311,14 @@ private static void writeDataAndClose(InputStream in, OutputStream out) throws I
}
// flush output stream
out.flush();
+ } catch (IOException e) {
+ // The client side has aborted or closed connection
+ logger.error("The client side has aborted or closed connection", e);
} finally {
// close the input stream
closeStream(in);
// close the output stream
- out.close();
+ closeStream(out);
}
}
diff --git a/src/java/main/com/topcoder/direct/services/view/util/DirectUtils.java b/src/java/main/com/topcoder/direct/services/view/util/DirectUtils.java
index 7d7a46ecb..85c3aaba7 100644
--- a/src/java/main/com/topcoder/direct/services/view/util/DirectUtils.java
+++ b/src/java/main/com/topcoder/direct/services/view/util/DirectUtils.java
@@ -1041,7 +1041,7 @@ public final class DirectUtils {
/**
* Default value url parameter perPage
*/
- private static final String PER_PAGE_VALUE = "1000";
+ private static final String PER_PAGE_VALUE = "2000";
/**
* The jackson object mapping which is used to deserialize json return from API to domain model.
@@ -3876,6 +3876,7 @@ public static Set