You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by zeeshanasghar <gi...@git.apache.org> on 2016/01/24 05:18:19 UTC

[GitHub] phoenix pull request: Utility classes should not have public const...

GitHub user zeeshanasghar opened a pull request:

    https://github.com/apache/phoenix/pull/149

    Utility classes should not have public constructors

    This pull request is focused on resolving occurrences of rule: 
    squid:S1118 - Utility classes should not have public constructors.
    
    You can find more information about the issue here:
    http://dev.eclipse.org/sonar/rules/show/squid:S1118
    
    Please let me know if you have any questions.
    
    Zeeshan

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/DevFactory/phoenix release/Utility-classes-should-not-have-public-constructors-fix-1

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/phoenix/pull/149.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #149
    
----
commit 921682b05845955bd9cde4322d9aa95552aa20a0
Author: Zeeshan Asghar <ze...@devfactory.com>
Date:   2016-01-22T09:53:41Z

    Utility classes should not have public constructors

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: Utility classes should not have public const...

Posted by samarthjain <gi...@git.apache.org>.
Github user samarthjain commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/149#discussion_r50730159
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/cache/JodaTimezoneCache.java ---
    @@ -27,10 +27,14 @@
     import org.apache.phoenix.schema.IllegalDataException;
     import org.joda.time.DateTimeZone;
     
    -public class JodaTimezoneCache {
    +public final class JodaTimezoneCache {
     
         public static final int CACHE_EXPRIRE_TIME_MINUTES = 10;
         private static final LoadingCache<ByteBuffer, DateTimeZone> cachedJodaTimeZones = createTimezoneCache();
    +    
    +    private JodaTimezoneCache(){
    --- End diff --
    
    Space after ) and {. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: Utility classes should not have public const...

Posted by zeeshanasghar <gi...@git.apache.org>.
Github user zeeshanasghar commented on the pull request:

    https://github.com/apache/phoenix/pull/149#issuecomment-174370465
  
    Thaks  @samarthjain.
    
    Jira number is: PHOENIX-2627


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: Utility classes should not have public const...

Posted by JamesRTaylor <gi...@git.apache.org>.
Github user JamesRTaylor commented on the pull request:

    https://github.com/apache/phoenix/pull/149#issuecomment-174252313
  
    Thanks for the PR, @zeeshanasghar. Please file a JIRA and prepend the JIRA number (i.e. PHOENIX-####) to your git commit message.
    
    Would you mind reviewing, @samarthjain ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: Utility classes should not have public const...

Posted by JamesRTaylor <gi...@git.apache.org>.
Github user JamesRTaylor commented on the pull request:

    https://github.com/apache/phoenix/pull/149#issuecomment-174630511
  
    @zeeshanasghar - please amend your commit message to "PHOENIX-2627 Utility classes should not have public constructors" so that conversations on the pull request are reflected in the JIRA.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: Utility classes should not have public const...

Posted by samarthjain <gi...@git.apache.org>.
Github user samarthjain commented on the pull request:

    https://github.com/apache/phoenix/pull/149#issuecomment-174604614
  
    @zeeshanasghar - patch looks fine to me. There are formatting issues in almost all the files though. See my comments on org/apache/phoenix/cache/JodaTimezoneCache.java. Also make sure to run mvn verify to ensure the changes didn't cause any regressions.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] phoenix pull request: Utility classes should not have public const...

Posted by samarthjain <gi...@git.apache.org>.
Github user samarthjain commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/149#discussion_r50730215
  
    --- Diff: phoenix-core/src/main/java/org/apache/phoenix/cache/JodaTimezoneCache.java ---
    @@ -27,10 +27,14 @@
     import org.apache.phoenix.schema.IllegalDataException;
     import org.joda.time.DateTimeZone;
     
    -public class JodaTimezoneCache {
    +public final class JodaTimezoneCache {
     
         public static final int CACHE_EXPRIRE_TIME_MINUTES = 10;
         private static final LoadingCache<ByteBuffer, DateTimeZone> cachedJodaTimeZones = createTimezoneCache();
    +    
    +    private JodaTimezoneCache(){
    +		throw new AssertionError("Must not instantiate this class");
    +	}
    --- End diff --
    
    Indentation seems off here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---