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

[fix] create DateProperty with TzId, it's timeZone is null. #134

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

gihyun-jeon
Copy link

Create DateProperty with difference constructor from same ical4jFormatDatetimeString and zoneId.
But DateProperty instances are not same.

String ical4jFormatDatetimeString = "20131012T140000";
String zoneId = "Asia/Seoul";

TimeZoneRegistry tzReg = TimeZoneRegistryFactory.getInstance().createRegistry();
DateProperty byTimeZone = new DtStart(ical4jFormatDatetimeString, tzReg.getTimeZone(zoneId));
// byTimeZone.getTimeZone() is not null.

ParameterList parameterList = new ParameterList();
parameterList.add(new TzId(zoneId));
DtStart byTzId = new DtStart(parameterList, ical4jFormatDatetimeString);
// byTzId .getTimeZone() is null.

So, modifed code.
when DateProperty constructor find Tzid, update itself's timeZone.

@gihyun-jeon gihyun-jeon changed the title [fix] create with TzId DateProperty, dose not have timeZone [fix] create DateProperty with TzId, it's timeZone is null. Mar 31, 2017
@codecov
Copy link

codecov bot commented Aug 11, 2017

Codecov Report

Merging #134 into master will increase coverage by 0.58%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #134      +/-   ##
============================================
+ Coverage     68.66%   69.24%   +0.58%     
+ Complexity     2104     2024      -80     
============================================
  Files           334      305      -29     
  Lines          8808     8155     -653     
  Branches       1258     1177      -81     
============================================
- Hits           6048     5647     -401     
+ Misses         2326     2091     -235     
+ Partials        434      417      -17
Impacted Files Coverage Δ Complexity Δ
...et/fortuna/ical4j/model/property/DateProperty.java 85.13% <100%> (+0.84%) 36 <1> (+2) ⬆️
...rtuna/ical4j/model/parameter/FmtTypeFactory.groovy 0% <0%> (-60%) 0% <0%> (-1%)
...va/net/fortuna/ical4j/model/CalendarException.java 0% <0%> (-50%) 0% <0%> (-1%)
...n/java/net/fortuna/ical4j/model/property/Name.java 56.25% <0%> (-18.75%) 4% <0%> (-1%)
.../main/java/net/fortuna/ical4j/model/Component.java 78.43% <0%> (-14.83%) 34% <0%> (-2%)
...in/java/net/fortuna/ical4j/model/property/Url.java 45.45% <0%> (-13.64%) 5% <0%> (-1%)
.../net/fortuna/ical4j/model/component/VTimeZone.java 74.19% <0%> (-9.68%) 15% <0%> (-3%)
...va/net/fortuna/ical4j/model/property/FreeBusy.java 59.37% <0%> (-9.38%) 7% <0%> (-1%)
...ava/net/fortuna/ical4j/model/parameter/Member.java 90.9% <0%> (-9.1%) 5% <0%> (ø)
...main/java/net/fortuna/ical4j/model/NumberList.java 92% <0%> (-8%) 10% <0%> (-1%)
... and 170 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ac3bb0f...750a473. Read the comment docs.

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

Successfully merging this pull request may close these issues.

None yet

3 participants