Skip to content

Polish #1938

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

Closed
wants to merge 1 commit into from
Closed

Polish #1938

wants to merge 1 commit into from

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Aug 22, 2018

This PR fixes some typos and polishes trivial stuff.

Copy link
Member

@snicoll snicoll left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @izeye! I've added a few suggestions to better explain the rationale. Does that make sense?

@@ -28,7 +28,7 @@

/**
* {@link org.springframework.cache.Cache} implementation on top of a
* {@link javax.cache.Cache} instance.
* {@link Cache} instance.
Copy link
Member

Choose a reason for hiding this comment

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

That full package name is actually on purpose as the Spring Cache abstraction has also a concept of Cache.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@snicoll If so, it should be {@link Cache javax.cache.Cache}, not {@link javax.cache.Cache} as the latter will be rendered as just Cache in Javadoc. Is it okay to change to {@link Cache javax.cache.Cache}?

See https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/cache/jcache/JCacheCache.html

Copy link
Member

Choose a reason for hiding this comment

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

Oh dear, good catch. Yes please.

@@ -28,7 +28,7 @@

/**
* {@link org.springframework.cache.CacheManager} implementation
* backed by a JCache {@link javax.cache.CacheManager}.
* backed by a JCache {@link CacheManager}.
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

@@ -53,22 +53,22 @@ public JCacheCacheManager() {

/**
* Create a new JCacheCacheManager for the given backing JCache.
* @param cacheManager the backing JCache {@link javax.cache.CacheManager}
* @param cacheManager the backing JCache {@link CacheManager}
Copy link
Member

Choose a reason for hiding this comment

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

And here

*/
public JCacheCacheManager(CacheManager cacheManager) {
this.cacheManager = cacheManager;
}


/**
* Set the backing JCache {@link javax.cache.CacheManager}.
* Set the backing JCache {@link CacheManager}.
Copy link
Member

Choose a reason for hiding this comment

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

etc etc

*/
public void setCacheManager(@Nullable CacheManager cacheManager) {
this.cacheManager = cacheManager;
}

/**
* Return the backing JCache {@link javax.cache.CacheManager}.
* Return the backing JCache {@link CacheManager}.
Copy link
Member

Choose a reason for hiding this comment

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

That too

@snicoll snicoll self-assigned this Aug 22, 2018
@@ -28,7 +28,7 @@

/**
* {@link org.springframework.cache.Cache} implementation on top of a
* {@link javax.cache.Cache} instance.
Copy link
Member

Choose a reason for hiding this comment

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

Without the fully qualified package name, we'd want to have "JCache" there in addition.

So we might as well just leave it as is for clarity, as was originally intended.

Thus, please either undo this change or prefix that with "JCache" as is done elsewhere in the Javadoc for this class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbrannen It looks the same concern as @snicoll 's #1938 (comment). I answered there and let me know what you think.

@@ -42,15 +42,15 @@


/**
* Create an {@link org.springframework.cache.jcache.JCacheCache} instance.
* Create a {@link org.springframework.cache.jcache.JCacheCache} instance.
Copy link
Member

Choose a reason for hiding this comment

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

The package name starts with an "o". Thus this is grammatically correct.

Please undo this change.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sbrannen "a" is intended for the rendered link in Javadoc, "JCacheCache", not "org.springframework.cache.jcache.JCacheCache". Am I missing something?

See https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/cache/jcache/JCacheCache.html

Copy link
Member

Choose a reason for hiding this comment

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

Hmmm.... good question!

I believe we (i.e., the collective core Spring Team) were thinking that the fully qualified class name (FQCN) shows up in the generated HTML when linked via FQCN.

So, if that's not the case, that would mean there is a larger issue across the entire code base in the core Spring Framework, since we routinely use "an" instead of "a" in such cases.

Perhaps it's better to address that nuanced feature of Javadoc in a dedicated JIRA issue.

@snicoll, thoughts?

Copy link
Member

Choose a reason for hiding this comment

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

@sbrannen thanks. Could you please raise a SPR issue for this? I got caught as well and I am wondering if that's not a new feature of javadoc or something (or I've been wrong this all time).

Copy link
Member

Choose a reason for hiding this comment

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

Indeed! I am also wondering if this was a change to how Javadoc works in a recent release (perhaps in JDK 8?).

And well... if you've been wrong this whole time, so have I and many others. 😉

I'll raise a JIRA issue to track this.

Copy link
Member

Choose a reason for hiding this comment

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

* @param jcache backing JCache Cache instance
*/
public JCacheCache(Cache<Object, Object> jcache) {
this(jcache, true);
}

/**
* Create an {@link org.springframework.cache.jcache.JCacheCache} instance.
* Create a {@link org.springframework.cache.jcache.JCacheCache} instance.
Copy link
Member

Choose a reason for hiding this comment

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

The package name starts with an "o". Thus this is grammatically correct.

Please undo this change.

@sbrannen

This comment has been minimized.

@sbrannen sbrannen dismissed their stale review August 22, 2018 16:00

@snicoll had reviewed this PR simultaneously.

@sbrannen
Copy link
Member

@snicoll, after our combined reviews, it appears that the only remaining polishing would be the removal of the extra space in the exception message.

Thus, I've dismissed my review and will let you take it from here.

Cheers,

Sam

@izeye
Copy link
Contributor Author

izeye commented Aug 22, 2018

@snicoll @sbrannen Thanks for the feedback! I've updated this PR as suggested.

@snicoll snicoll closed this in 4db5d28 Aug 23, 2018
snicoll added a commit that referenced this pull request Aug 23, 2018
@snicoll
Copy link
Member

snicoll commented Aug 23, 2018

Thanks a lot @izeye, this is now merged in master.

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.

3 participants