Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot annotate due to UnsupportedEncodingException: utf8-bom #220

Closed
aaron-mar opened this issue Aug 20, 2020 · 1 comment
Closed

Cannot annotate due to UnsupportedEncodingException: utf8-bom #220

aaron-mar opened this issue Aug 20, 2020 · 1 comment
Assignees
Labels

Comments

@aaron-mar
Copy link

Using:
Intellij: Community 2020.2, Build IC-202.6397.94
Perforce IDEA Community Integration: 0.11.0

To reproduce this:

  • Set up perforce in intellij
  • Add perforce workspace into intellij
  • load a file from perforce in intellij
  • Right click on the editor sidebar and select "annotate"
  • Notice the error message: Error: utf8-bom
  • Notice the exception in the intellij log

The exception coming out in the log looks like this:

2020-08-20 07:50:01,394 [581155406] WARN - ctions.AnnotateLocalFileAction - utf8-bom
net.groboclown.p4.server.api.P4CommandRunner$ServerResultException: utf8-bom
at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.createServerResultException(P4RequestErrorHandler.java:132)
at net.groboclown.p4.server.impl.connection.impl.MessageP4RequestErrorHandler.handleException(MessageP4RequestErrorHandler.java:470)
at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handleConnection(P4RequestErrorHandler.java:162)
at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handle(P4RequestErrorHandler.java:55)
at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$handleAsync$5(SimpleConnectionManager.java:579)
at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$startPromise$8(SimpleConnectionManager.java:597)
at net.groboclown.p4.server.api.async.AsyncAnswer.lambda$background$0(AsyncAnswer.java:49)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:20)
at com.intellij.util.RunnableCallable.call(RunnableCallable.java:11)
at com.intellij.openapi.application.impl.ApplicationImpl$1.call(ApplicationImpl.java:268)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.io.UnsupportedEncodingException: utf8-bom
at java.base/java.lang.StringCoding.decode(StringCoding.java:243)
at java.base/java.lang.String.(String.java:467)
at java.base/java.lang.String.(String.java:537)
at net.groboclown.p4.server.impl.connection.ConnectCommandRunner.lambda$getFileAnnotation$26(ConnectCommandRunner.java:292)
at net.groboclown.p4.server.impl.connection.impl.SimpleConnectionManager.lambda$null$0(SimpleConnectionManager.java:125)
at net.groboclown.p4.server.impl.connection.P4RequestErrorHandler.handleConnection(P4RequestErrorHandler.java:157)
... 15 more

@groboclown
Copy link
Owner

Looks like this was pulling the Perforce named encoding ("utf8-bom"), which isn't a valid Java encoding. I've added a fix for it that should be in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants