fiji / SPIM_Registration

Deprecated, instead check out: https://github.com/preibischLab/multiview-reconstruction & https://github.com/PreibischLab/BigStitcher
GNU General Public License v2.0
23 stars 22 forks source link

Need to get the return valued of String.replace() #141

Open scuniff opened 8 months ago

scuniff commented 8 months ago

https://github.com/fiji/SPIM_Registration/blob/5472f9b8ca6885ac50cf9d606b2791a8cf5a3e77/src/main/java/spim/fiji/plugin/Apply_Transformation.java#L735

    while ( entry.contains( "(" ) )
        entry.replace( "(", "" );

    while ( entry.contains( ")" ) )
        entry.replace( ")", "" );

    while ( entry.contains( "[" ) )
        entry.replace( "[", "" );

    while ( entry.contains( "]" ) )
        entry.replace( "]", "" );

String entry is not getting updated from the call to replace().

All these calls to replace() should be modified to: entry = entry.replace(

Presently I’m assuming these 4 calls to entry.contains() never returns true because I think an infinite loop would occur.