Bug 566657 - use java.net.URI instead of java.net.URL

Invocation of java.net.URL.equals(Object), which blocks to do domain
name resolution, in
org.eclipse.jdt.internal.core.search.indexing.IndexManager.computeIndexLocation(IPath,
URL)

The equals and hashCode method of URL perform domain name resolution,
this can result in a big performance hit. See
http://michaelscharf.blogspot.com/2006/11/javaneturlequals-and-hashcode-make.html
for more information. Consider using java.net.URI instead.

Rank: Of Concern (16), confidence: High
Pattern: DMI_BLOCKING_METHODS_ON_URL
Type: Dm, Category: PERFORMANCE (Performance)

Change-Id: I29936f8f7df460aeb4195df1cbdf8df72c01d6f6
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Reviewed-on: https://git.eclipse.org/r/c/jdt/eclipse.jdt.core/+/174169
Tested-by: JDT Bot <jdt-bot@eclipse.org>
Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
Reviewed-by: Jay Arthanareeswaran <jarthana@in.ibm.com>
4 files changed
tree: 9012ba082dba4f2086e94a99051227525dc8eef6
  1. JCL/
  2. modules/
  3. org.eclipse.jdt.annotation/
  4. org.eclipse.jdt.annotation_v1/
  5. org.eclipse.jdt.apt.core/
  6. org.eclipse.jdt.apt.pluggable.core/
  7. org.eclipse.jdt.apt.pluggable.tests/
  8. org.eclipse.jdt.apt.tests/
  9. org.eclipse.jdt.apt.ui/
  10. org.eclipse.jdt.compiler.apt/
  11. org.eclipse.jdt.compiler.apt.tests/
  12. org.eclipse.jdt.compiler.tool/
  13. org.eclipse.jdt.compiler.tool.tests/
  14. org.eclipse.jdt.core/
  15. org.eclipse.jdt.core.ecj.validation/
  16. org.eclipse.jdt.core.formatterapp/
  17. org.eclipse.jdt.core.internal.tools/
  18. org.eclipse.jdt.core.tests.builder/
  19. org.eclipse.jdt.core.tests.compiler/
  20. org.eclipse.jdt.core.tests.model/
  21. org.eclipse.jdt.core.tests.performance/
  22. org.eclipse.jdt.tests.latestBREE/
  23. tests-pom/
  24. .gitignore
  25. CONTRIBUTING
  26. LICENSE
  27. NOTICE
  28. pom.xml
  29. README.md
README.md

JDT Core

This is the core part of Eclipse's Java development tools. It contains the non-UI support for compiling and working with Java code, including the following:

  • an incremental or batch Java compiler that can run standalone or as part of the Eclipse IDE
  • Java source and class file indexer and search infrastructure
  • a Java source code formatter
  • APIs for code assist, access to the AST and structured manipulation of Java source.

For more information and important links, refer to the [JDT wiki page] 1 or the [JDT project overview page] 2.

License

Eclipse Public License (EPL) v2.0