Skip to content

Stubbing the rest of JSR 075 (PIM) #154

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

Merged
merged 5 commits into from
Feb 11, 2023

Conversation

AShiningRay
Copy link
Contributor

@AShiningRay AShiningRay commented Jul 6, 2022

JSR 075 is composed of both FileConnect and PIM. FileConnect is being reviewed alongside bluetooth and obex over at #145, and adding even more files to that massive pull request isn't a good idea. Thankfully, PIM has no dependency on FileConnect, so it can be its own PR.

Fixes #155.

Edit: I see, yes i could have separated it into smaller units, but i figured having the whole PIM spec in one PR would be more organized. I'll try shortening the amount of files and changes in the next pull requests.

I didn't find anything that needs this yet, but since it is part
of the ME specification, it's good to have it around just in case.
Not that necessary, but it gets that class closer to the docs.
Copy link
Collaborator

@recompileorg recompileorg left a comment

Choose a reason for hiding this comment

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

You could probably have broken this up into multiple requests rather than one big omnibus. It makes review a bit more error prone as people tend to skip over details when there's a lot to go over.

I understand wanting to push it in one big block because that's how you wrote it, but it does get tiring.

public class FieldFullException extends RuntimeException
{

private final int fieldVal;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is this final?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was trying to optimize those exceptions by only allowing one assignment into that fieldVal int var. My logic at the time i was writing those classes was that if the Java app will throw new exception object every time it happens, it wouldn't be harmful to have that field as final... but better be on the safe side and allow it to be assigned as much as it needs to be.

public FieldFullException(String detailMessage, int field)
{
super(detailMessage);
this.fieldVal = field;
Copy link
Collaborator

Choose a reason for hiding this comment

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

this isn't necessary. See line 29.

You sometimes see this used when the field and parameter share the same name, which they do not. I typically favor modifying the name of the parameter rather than using this to avoid any potential confusion.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm... i've been stubbing those files for a few days so i don't remember exactly why things like those are in, but i named it "field" at the start and figured it would be better to just give it a unique name in the class, but probably didn't alter the rest of the code. I'll be removing those from all the files with unique fields i can find.

@AShiningRay AShiningRay requested a review from recompileorg July 7, 2022 17:54
@recompileorg recompileorg merged commit 8344bcb into hex007:master Feb 11, 2023
@AShiningRay AShiningRay deleted the master-pim branch February 17, 2023 01:45
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.

PIM features are not present (Part of JSR 075)
2 participants