HubTurbo / addressbook

A small app for training and experimentation
Other
1 stars 3 forks source link

Upgrader should keep retrying when trying to replace updater #536

Closed m133225 closed 8 years ago

m133225 commented 8 years ago

Currently update fails on Windows since it is attempting to replace the updater before it closes.

m133225 commented 8 years ago

Seems like this is not the case, instead:

Exception in thread "pool-7-thread-1" java.util.regex.PatternSyntaxException: Illegal Unicode escape sequence near index 5
lib\updater-\d\.\d\.\d\.jar
     ^
        at java.util.regex.Pattern.error(Unknown Source)
        at java.util.regex.Pattern.uxxxx(Unknown Source)
        at java.util.regex.Pattern.u(Unknown Source)
        at java.util.regex.Pattern.escape(Unknown Source)
        at java.util.regex.Pattern.atom(Unknown Source)
        at java.util.regex.Pattern.sequence(Unknown Source)
        at java.util.regex.Pattern.expr(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.<init>(Unknown Source)
        at java.util.regex.Pattern.compile(Unknown Source)
        at java.util.regex.Pattern.matches(Unknown Source)
        at java.lang.String.matches(Unknown Source)
        at updater.Updater.lambda$getUpdaterFile$13(Updater.java:167)
        at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
        at java.util.HashMap$KeySpliterator.tryAdvance(Unknown Source)
        at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source)
        at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source)
        at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
        at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
        at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source)
        at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
        at java.util.stream.ReferencePipeline.findAny(Unknown Source)
        at updater.Updater.getUpdaterFile(Updater.java:168)
        at updater.Updater.checkForUpdate(Updater.java:136)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

EDIT: This issue should still apply although it doesn't happen on my machine since the updater is not being updated from 1.5.0ea to 1.5.1ea. Will try to fix both.