mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-15 14:56:41 +00:00
bug5515: fixed trimming problem with sail numbers in score correction assignment dialog
This commit is contained in:
1 parent
c63a9dae85
commit
75f31b9e36
4 files changed
+9
-15
No files matched your search
+3
-11
@@ -137,7 +137,7 @@ public class MatchAndApplyScoreCorrectionsDialog extends DataEntryDialog<BulkSco
|
||||
int i=1;
|
||||
int selectionIndex = -1;
|
||||
for (String entry : entries) {
|
||||
result.addItem(entry);
|
||||
result.addItem(entry, entry);
|
||||
if (selectedItem != null && selectedItem.equals(entry)) {
|
||||
selectionIndex = i;
|
||||
}
|
||||
@@ -317,16 +317,8 @@ public class MatchAndApplyScoreCorrectionsDialog extends DataEntryDialog<BulkSco
|
||||
* @return <code>null</code> if the empty string was selected
|
||||
*/
|
||||
private <T> String getSelectedString(Map<T, ListBox> choosersByT, T t) {
|
||||
String result = null;
|
||||
ListBox chooser = choosersByT.get(t);
|
||||
int selectedIndex = chooser.getSelectedIndex();
|
||||
if (selectedIndex != -1) {
|
||||
result = chooser.getItemText(selectedIndex);
|
||||
if (result.length() == 0) {
|
||||
result = null;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
final ListBox chooser = choosersByT.get(t);
|
||||
return Util.hasLength(chooser.getSelectedValue()) ? chooser.getSelectedValue() : null;
|
||||
}
|
||||
|
||||
private static class Validator implements DataEntryDialog.Validator<BulkScoreCorrectionDTO> {
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<ul class="bulletList">
|
||||
<li>The <tt>/sailingserver/api/v1/wind/putWind</tt> method now has a missing null check in case
|
||||
there are untracked regattas in the scope analyzed for races that would accept wind fixed.</li>
|
||||
<li>Importing of results where sail numbers have leading or trailing space/blank characters works now.</li>
|
||||
</ul>
|
||||
<h2 class="articleSubheadline">March 2021</h2>
|
||||
<ul class="bulletList">
|
||||
|
||||
+3
-3
@@ -48,12 +48,12 @@ public class ScoreCorrectionProviderImpl extends AbstractYachtScoringProvider im
|
||||
for (ResultDocumentDescriptor resultDocDescr : documentProvider.getResultDocumentDescriptors()) {
|
||||
String eventName = resultDocDescr.getEventName() != null ? resultDocDescr.getEventName() : resultDocDescr.getRegattaName();
|
||||
String boatClass = resultDocDescr.getBoatClass();
|
||||
if(boatClass != null && eventName != null) {
|
||||
if(resultDocDescr.getCompetitorGenderType() != null) {
|
||||
if (boatClass != null && eventName != null) {
|
||||
if (resultDocDescr.getCompetitorGenderType() != null) {
|
||||
boatClass += ", " + resultDocDescr.getCompetitorGenderType().name();
|
||||
}
|
||||
Set<Util.Pair<String, TimePoint>> eventResultsSet = result.get(eventName);
|
||||
if(eventResultsSet == null) {
|
||||
if (eventResultsSet == null) {
|
||||
eventResultsSet = new HashSet<Util.Pair<String, TimePoint>>();
|
||||
result.put(eventName, eventResultsSet);
|
||||
}
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@ import java.net.URLConnection;
|
||||
import com.sap.sailing.domain.common.CompetitorGenderType;
|
||||
import com.sap.sailing.resultimport.ResultDocumentDescriptor;
|
||||
import com.sap.sse.common.TimePoint;
|
||||
import com.sap.sse.util.HttpUrlConnectionHelper;
|
||||
|
||||
public class UrlResultDocumentDescriptorImpl implements ResultDocumentDescriptor {
|
||||
private URL documentURL;
|
||||
@@ -71,7 +72,7 @@ public class UrlResultDocumentDescriptorImpl implements ResultDocumentDescriptor
|
||||
@Override
|
||||
public InputStream getInputStream() {
|
||||
try {
|
||||
URLConnection eventResultConn = documentURL.openConnection();
|
||||
URLConnection eventResultConn = HttpUrlConnectionHelper.redirectConnection(documentURL);
|
||||
InputStream inputStream = (InputStream) eventResultConn.getContent();
|
||||
return inputStream;
|
||||
} catch (IOException e) {
|
||||
|
||||
Reference in new issue
Block a user