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 bugs with Timespan#getAs #6909

Merged
merged 3 commits into from
Jul 18, 2024

Conversation

sovdeeth
Copy link
Member

Description

Remove rounding from getAs (it should truncate anyway) to avoid limiting as int max value. Fix bug where millis was multiplied instead of divided.


Target Minecraft Versions: any
Requirements: none
Related Issues: #6908

…ing as int max value. Fix bug where millis was multiplied instead of divided.
@sovdeeth sovdeeth added bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. 2.9 Targeting a 2.9.X version release labels Jul 16, 2024
@sovdeeth sovdeeth changed the base branch from master to dev/patch July 16, 2024 16:18
@sovdeeth sovdeeth added the patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version. label Jul 16, 2024
Copy link
Collaborator

@TheLimeGlass TheLimeGlass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 213 needs the Javadoc fixed aswell

-@deprecated Use {@link Timespan#Timespan(TimePeriod, long)}
+@deprecated Use {@link #Timespan(TimePeriod, long)}

@sovdeeth
Copy link
Member Author

Line 213 needs the Javadoc fixed aswell

-@deprecated Use {@link Timespan#Timespan(TimePeriod, long)}
+@deprecated Use {@link #Timespan(TimePeriod, long)}

Is this an issue? Seems fine either way to me.

@TheLimeGlass
Copy link
Collaborator

Is this an issue? Seems fine either way to me.

There is no subclass called new Timespan.Timespan(TimePeriod, long)

@sovdeeth
Copy link
Member Author

sovdeeth commented Jul 16, 2024

Is this an issue? Seems fine either way to me.

There is no subclass called new Timespan.Timespan(TimePeriod, long)

No, that's just the way to reference the constructor. It appear fine on javadocs:
image
image

@TheLimeGlass
Copy link
Collaborator

No, that's just the way to reference the constructor. It appear fine on javadocs: image image

VSCode using IntelliSense and Eclipse state otherwise
Untitled

@sovdeeth
Copy link
Member Author

No, that's just the way to reference the constructor. It appear fine on javadocs: image image

VSCode using IntelliSense and Eclipse state otherwise Untitled

Seems like an issue with those extensions, then, because it's valid in java docs specifications.
image
from https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#tag

@TheLimeGlass
Copy link
Collaborator

Seems like an issue with those extensions, then, because it's valid in java docs specifications. image from https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#tag

Applying my suggestion solves the issue for IDE's and the Javadoc

@sovdeeth
Copy link
Member Author

Seems like an issue with those extensions, then, because it's valid in java docs specifications. image from https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#tag

Applying my suggestion solves the issue for IDE's and the Javadoc

I can make the change but you should probably report that as a bug and/or get a better extension/IDE, since it displays fine on intellij too

@sovdeeth sovdeeth merged commit ce93263 into SkriptLang:dev/patch Jul 18, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.9 Targeting a 2.9.X version release bug An issue that needs to be fixed. Alternatively, a PR fixing an issue. patch-ready A PR/issue that has been approved and is ready to be merged/closed for the next patch version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants