Jim Procter

I know the problems you had with close() - you mentioned in the comments on the issue. However, you might have noticed that FileParse.close() is not called from many places, so changing its behavio...

I know the problems you had with close() - you mentioned in the comments on the issue. However, you might have noticed that FileParse.close() is not called from many places, so changing its behaviour wouldn't have too many side effects.

The intended pattern for FileParse.close() was:

ParserThing pt;
try {
pt = new <? assignable to FileParse>(data spec..)
.. do whatever needed to trigger parsing
.. then check pt's error/warning status and report any problems.
} catch (IOException ..) {
.. handle read or parse errors 
}
finally {
if (pt!=null) {
pt.close();
} // catch and report any IOErrors if desired
}
Ideally, any low level file ops should happen in the base class (FileParse) rather than here. AlignFile should call the FileParse.close() method rather than directly manipulate dataIn, which is man...

Ideally, any low level file ops should happen in the base class (FileParse) rather than here. AlignFile should call the FileParse.close() method rather than directly manipulate dataIn, which is managed by FileParse. Note that FileParse.close() nulls the dataIn reference so the stream can be garbage collected properly.

It's also good practice to try to close() in a finally {} clause, catching and reporting exceptions if needed... this is actually what the FileParse.close() method's design was intended for, since the caller should have already checked 'error' and 'errormessage' for parsing problems. Exceptions/Errors on close are not fatal for file import.

file close error will trash import of project

file close error will trash import of project

close filehandles straight after parse, without setting an error
close filehandles straight after parse, without setting an error
JAL-3933 Updated log4j jars with log4j-2.16.0 and compatibility API log4j-1.2-api-2.16.0. Stripped...
JAL-3933 Updated log4j jars with log4j-2.16.0 and compatibility API log4j-1.2-api-2.16.0. Stripped...
one class with a static factory method seems to be better than two classes and an external mutable object.

one class with a static factory method seems to be better than two classes and an external mutable object.

yes, I see that, but do you really need a nested static class ? in line with my general comments re encapsulating the Map<String,SequenceInfo> further: perhaps it might make sense to simply apply a...

yes, I see that, but do you really need a nested static class ? in line with my general comments re encapsulating the Map<String,SequenceInfo> further: perhaps it might make sense to simply apply a factory pattern rather than have an internal bean that a generic map holds references to ?

(lets not get stuck on this though, the main thing is that the implementation works fine for now, though needs more work in order to save/restore sequenceInfo objects from Jalview project files)

we won't see this messages unless asserts are enabled. Cache.log.warn is perhaps better ?

we won't see this messages unless asserts are enabled. Cache.log.warn is perhaps better ?

it's a reasonable first pass, though stylistically all you've done is transformed a single concrete instance (Hashtable) to a more strongly typed verbose instance (Map<String,SequenceInfo>). Why no...

it's a reasonable first pass, though stylistically all you've done is transformed a single concrete instance (Hashtable) to a more strongly typed verbose instance (Map<String,SequenceInfo>). Why not go further and have a SequencesInfo object that records metadata for one or more sequences ?

There are also other requirements: SequenceInfo sets will need to be persisted for a web services job. You could expand JAL-3899 to incorporate this perhaps - JAL-1786 is the relevant epic for that.

why does this class need to be static ?

why does this class need to be static ?

this should probably be Cache.log.warn(..)

this should probably be Cache.log.warn(..)

JAL-3899 Refactor sequence de/uniquification.
JAL-3899 Refactor sequence de/uniquification.
after taking a look at the rest I can see that the next step is to split this class up further. There's plenty of code that will be used by many different operations - e.g. job state management - i...

after taking a look at the rest I can see that the next step is to split this class up further. There's plenty of code that will be used by many different operations - e.g. job state management - is that the plan ?

not really the recommended way - see e.g. https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/beans/PropertyChangeSupport.html *do you need to expose the generic binders ? what k...

not really the recommended way - see e.g. https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/java/beans/PropertyChangeSupport.html

  • do you need to expose the generic binders ? what kind of events need to be monitored ?
is utils really the right name ? suggest the classes are used in several different places

is utils really the right name ? suggest the classes are used in several different places

this is going to get much more complex. there are plenty of additional attributes - e.g. input type (dna, protein, rna) - none of them are currently being configured on the operation.

this is going to get much more complex. there are plenty of additional attributes - e.g. input type (dna, protein, rna) - none of them are currently being configured on the operation.

this class seems to contain a bunch of hard coded stuff taken from the original web services configuration code rather than provide a way for a web services provider to configure an instance of Ali...

this class seems to contain a bunch of hard coded stuff taken from the original web services configuration code rather than provide a way for a web services provider to configure an instance of AlignmentOperation tuned to the alignment service that the provider is offering.

first review of Web Services overhaul for 2.12
first review of Web Services overhaul for 2.12
patch needed for 2.11.2 - JAL-3518 - catch case when no replies are available

patch needed for 2.11.2 - JAL-3518 - catch case when no replies are available