Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/671#discussion_r71214452
--- Diff:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/util/SnippetUtils.java
---
@@ -565,13 +567,15 @@ private void updateControllerServiceIdentifiers(final
ProcessorConfigDTO configD
/**
* Generates a new id for the current id that is specified. If no seed
is found, a new random id will be created.
*/
- private String generateId(final String currentId, final String seed) {
+ private String generateId(final String currentId, final String seed,
boolean isCopy) {
long msb = UUID.fromString(currentId).getMostSignificantBits();
- long lsb = StringUtils.isBlank(seed)
+ int lsb = StringUtils.isBlank(seed)
? Math.abs(new Random().nextInt())
- :
Math.abs(ByteBuffer.wrap(seed.getBytes(StandardCharsets.UTF_8)).getInt());
+ : Math.abs(seed.hashCode());
- return new UUID(msb, lsb).toString();
+ return isCopy ? TypeOneUUIDGenerator.generateId(msb,
lsb).toString() : new UUID(msb, lsb).toString();
+ // return TypeOneUUIDGenerator.generateId(msb, lsb).toString();
--- End diff --
Should be able to remove this now
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---