Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 358398

Summary: Fix (FindBugs) warnings in UniversalUniqueIdentifier
Product: [ECD] Orion Reporter: Tomasz Zarna <tomasz.zarna>
Component: ServerAssignee: Tomasz Zarna <tomasz.zarna>
Status: RESOLVED FIXED QA Contact:
Severity: trivial    
Priority: P3    
Version: unspecified   
Target Milestone: 0.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Tomasz Zarna CLA 2011-09-21 07:43:17 EDT
Non-externalized string literal >> it should be followed by //$NON-NLS-<n>$

Warnings reported by FindBugs:

* Method org.eclipse.orion.server.core.resources.UniversalUniqueIdentifier.toStringAsBytes() concatenates strings using + in a loop >> Better performance can be obtained by using a StringBuffer (or StringBuilder in Java 1.5) explicitly.
* org.eclipse.orion.server.core.resources.UniversalUniqueIdentifier.computeNodeAddress() invokes inefficient new String() constructor >> Use the empty string constant directly
* Method org.eclipse.orion.server.core.resources.UniversalUniqueIdentifier.nextClockSequence() uses the nextDouble method of Random to generate a random integer >> Using nextInt is more efficient