Skip to content

Commit

Permalink
OSGI MimeTypes resource #797
Browse files Browse the repository at this point in the history
Pass MimeTypes.class as the classloader source.  
No unit test to confirm the fix.
  • Loading branch information
gregw committed Aug 2, 2016
1 parent 6516ee1 commit 53a1b8f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public Type getBaseType()
try
{
String resourceName = "org/eclipse/jetty/http/mime.properties";
URL mimeTypesUrl = Loader.getResource(__dftMimeMap.getClass(), resourceName);
URL mimeTypesUrl = Loader.getResource(MimeTypes.class, resourceName);

This comment has been minimized.

Copy link
@joakime

joakime Aug 2, 2016

Contributor

Be careful with your commit messages.
That's not one of the formats that recognized by git or github.

This comment has been minimized.

Copy link
@gregw

gregw Aug 2, 2016

Author Contributor

What's wrong with the format? Subject line, blank line, then detail??? github is recognizing the #797 OK and the syntax editor in my git commit is not going red like it does when the format is bad?

This comment has been minimized.

Copy link
@sbordet

sbordet Aug 2, 2016

Contributor

@gregw the format is this: https://help.github.com/articles/closing-issues-via-commit-messages/. @joakime I believe we use that format for generating version.txt, right ?

This comment has been minimized.

Copy link
@gregw

gregw Aug 2, 2016

Author Contributor

@sbordet i know those formats but i choose not to say fixed as i want issues left open until confirmed by the OP and/or documented. Every commit is not a fix.

This comment has been minimized.

Copy link
@joakime

joakime Aug 2, 2016

Contributor

Then use one of the following:

  • Issue #797 - unborking i/o
  • #797 - tightening widget
  • Bug #797 - applying reverse reostat algorithm

We can't use arbitrary "#[0-9]*" anywhere in the commit subject line as that returns far too many false positives (other issues, other PRs, other projects issues, random anchors, etc)

We have settled on keeping the issue number at the start of the commit subject line.

Even just #797 alone in the subject line (no text) is sufficient.

This commit (the one we are commenting on) will not be picked up as it does not conform to our git commit subject line structures. (which we have been using since codehaus, thru bugzilla, and even now in github).

This comment has been minimized.

Copy link
@gregw

gregw Aug 3, 2016

Author Contributor

OK I misunderstood when we changed to use github style. The problem with lines like:

#797 - do something

is that by starting with a # they are seen as comment lines and not put into the commit message at all. So I though we were looking for any #[0-9]+ pattern in the first line. Now you say this not the case? So what patterns are we looking for? It looks like it includes ^Issue #[0-9]+, ^Bug #[0-9]+, ^Fixes #[0-9]+ etc, or is it dependent on the - so is looking for ^.*#[0-9]+.*- ???

So I'm totally confused. So rather than telling me what isn't matched can we document what is?

if (mimeTypesUrl == null)
{
LOG.warn("Missing mime-type resource: {}", resourceName);
Expand Down Expand Up @@ -241,7 +241,7 @@ public Type getBaseType()
try
{
String resourceName = "org/eclipse/jetty/http/encoding.properties";
URL mimeTypesUrl = Loader.getResource(__dftMimeMap.getClass(), resourceName);
URL mimeTypesUrl = Loader.getResource(MimeTypes.class, resourceName);
if (mimeTypesUrl == null)
{
LOG.warn("Missing mime-type resource: {}", resourceName);
Expand Down

0 comments on commit 53a1b8f

Please sign in to comment.