Skip to content
Snippets Groups Projects
Commit 1c3bbbd1 authored by gmantele's avatar gmantele
Browse files

[TAP] Fix MAXREC bug (maxrec was ignored if = 0) & Replace the MIME type for...

[TAP] Fix MAXREC bug (maxrec was ignored if = 0) & Replace the MIME type for VOTable output from 'text/xml' to 'application/xml'
parent fbeb58f6
No related branches found
No related tags found
No related merge requests found
...@@ -160,7 +160,7 @@ public class VOTableFormat implements OutputFormat { ...@@ -160,7 +160,7 @@ public class VOTableFormat implements OutputFormat {
@Override @Override
public final String getMimeType(){ public final String getMimeType(){
return "text/xml"; return "application/xml";
} }
@Override @Override
...@@ -599,7 +599,7 @@ public class VOTableFormat implements OutputFormat { ...@@ -599,7 +599,7 @@ public class VOTableFormat implements OutputFormat {
public boolean next() throws IOException{ public boolean next() throws IOException{
irow++; irow++;
try{ try{
if (maxrec <= 0 || irow < maxrec){ if (maxrec < 0 || irow < maxrec){
boolean hasNext = tableIt.nextRow(); boolean hasNext = tableIt.nextRow();
if (hasNext){ if (hasNext){
for(int i = 0; i < nbCol && tableIt.hasNextCol(); i++) for(int i = 0; i < nbCol && tableIt.hasNextCol(); i++)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment