Skip to content
Snippets Groups Projects
Commit 1a817ab8 authored by Sebastian Bergemann's avatar Sebastian Bergemann
Browse files

Improved switch to java.time.ZonedDateTime for reuse plugin

Issue-Ref: 4149
Issue-Url: af3#4149



Signed-off-by: default avatarSebastian Bergemann <bergemann@fortiss.org>
parent dbfc68c3
No related branches found
No related tags found
1 merge request!181Added correct hash creation in reuse (+ update detection)
......@@ -9,7 +9,8 @@
<foreignModel>reuse.ecore</foreignModel>
<genPackages prefix="AF3Reuse" basePackage="org.fortiss.tooling.ext.reuse" disposableProviderFactory="true"
ecorePackage="reuse.ecore#/">
<genDataTypes ecoreDataType="reuse.ecore#//EZonedDateTime" create="return ZonedDateTime.parse(it);"/>
<genDataTypes ecoreDataType="reuse.ecore#//EZonedDateTime" create="return java.time.ZonedDateTime.parse(it);"
convert="return java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.format(it);"/>
<genClasses ecoreClass="reuse.ecore#//ReuseLibrary">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference reuse.ecore#//ReuseLibrary/reuseElementList"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute reuse.ecore#//ReuseLibrary/libraryUUID"/>
......
ReuseLibraryModelElementFactory.java edac61169c3522577057a37b0e001153cea23e3b YELLOW
ReuseLibraryUtils.java 342fc58e50d6a86393050d5523715fa5b5971ad3 YELLOW
ReuseLibraryUtils.java e5c6cf60b4f6c4ad76cc19999668d99a6355e04c YELLOW
......@@ -939,8 +939,7 @@ public class ReuseLibraryUtils {
// e.g. if the original reuse element in the library was updated by someone else
// in the meantime).
int hash = element.hashCode();
String dateAsString = getDateAsString(modifyDate);
String hashString = String.valueOf(hash) + dateAsString;
String hashString = String.valueOf(hash) + "__" + getDateAsString(modifyDate);
return hashString;
}
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment