Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cadc-quality/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ repositories {

apply from: '../opencadc.gradle'

sourceCompatibility = 1.8
sourceCompatibility = 11

group = 'org.opencadc'

version = '1.0.1'
version = '1.1.0'

description = 'OpenCADC Checkstyle Code Quality Rules'
def git_url = 'https://github.com/opencadc/core'

checkstyle {
ignoreFailures = false
configFile = file("${projectDir}/src/main/resources/cadc_checkstyle.xml")
toolVersion = '8.2'
toolVersion = '10.12.5'
sourceSets = [project.sourceSets.test]
}

9 changes: 4 additions & 5 deletions cadc-quality/src/main/resources/cadc_checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>

<module name="LineLength">
<property name="max" value="160"/> <!--cadc changed from 100 -->
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
Expand All @@ -46,10 +49,6 @@
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="160"/> <!--cadc changed from 100 -->
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
Expand Down
4 changes: 2 additions & 2 deletions cadc-quality/src/main/resources/cadc_quality.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ configurations {
}

dependencies {
compile 'com.puppycrawl.tools:checkstyle:8.2'
compile 'com.puppycrawl.tools:checkstyle:10.12.5'

checkstyleDep 'org.opencadc:cadc-quality:1.+'
}

checkstyle {
ignoreFailures = false
config = resources.text.fromArchiveEntry(configurations.checkstyleDep, 'cadc_checkstyle.xml')
toolVersion = '8.2'
toolVersion = '10.12.5'
sourceSets = []
}
3 changes: 2 additions & 1 deletion cadc-rest/src/main/java/ca/nrc/cadc/rest/InitAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ protected static Version getLibraryVersion(Class probe) {
/**
* Called during shutdown by the RestServlet destroy() method.
*/
public void doShutdown() {}
public void doShutdown() {
}

}
2 changes: 0 additions & 2 deletions cadc-rest/src/main/java/ca/nrc/cadc/rest/SyncOutput.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;

import java.net.URI;
import java.text.DateFormat;
import java.util.Date;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

/**
Expand Down
12 changes: 6 additions & 6 deletions cadc-util/src/main/java/ca/nrc/cadc/auth/Asn1Object.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,25 @@
************************************************************************
*/

/************************************************************************
*
/*
*
* This class has been extracted from the PrivtKeyReader class at:
* http://www.androidadb.com/source/oauth-read-only/java/jmeter/jmeter/
* src/main/java/org/apache/jmeter/protocol/oauth/
* sampler/PrivateKeyReader.java.html
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
************************************************************************/
*
*/

package ca.nrc.cadc.auth;

Expand Down
1 change: 0 additions & 1 deletion cadc-util/src/main/java/ca/nrc/cadc/auth/Authorizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.net.TransientException;

import java.io.FileNotFoundException;
import java.net.URI;
import java.security.AccessControlException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@
import java.security.PrivateKey;
import java.security.cert.X509Certificate;
import javax.net.ssl.X509KeyManager;

import org.apache.log4j.Logger;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.util.StringUtil;

import java.io.Serializable;
import java.security.Principal;

Expand Down
3 changes: 0 additions & 3 deletions cadc-util/src/main/java/ca/nrc/cadc/auth/CertCmdArgUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,8 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.util.ArgumentMap;

import java.io.File;

import javax.security.auth.Subject;

import org.apache.log4j.Logger;

/**
Expand Down
18 changes: 9 additions & 9 deletions cadc-util/src/main/java/ca/nrc/cadc/auth/DerParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,24 @@
************************************************************************
*/

/************************************************************************
*
* This class has been extracted from the PrivtKeyReader class at:
/*
*
* This class has been extracted from the PrivateKeyReader class at:
* http://www.androidadb.com/source/oauth-read-only/java/jmeter/jmeter/
* src/main/java/org/apache/jmeter/protocol/oauth/
* sampler/PrivateKeyReader.java.html
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
************************************************************************/

package ca.nrc.cadc.auth;
Expand All @@ -63,15 +63,15 @@
* A bare-minimum ASN.1 DER decoder, just having enough functions to decode
* PKCS#1 private keys. Especially, it doesn't handle explicitly tagged types
* with an outer tag.
*
*
* <p/>
* This parser can only handle one layer. To parse nested constructs, get a new
* parser for each layer using <code>Asn1Object.getParser()</code>.
*
*
* <p/>
* There are many DER decoders in JRE but using them will tie this program to a
* specific JCE/JVM.
*
*
* @author zhang
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.util.StringUtil;

import java.io.Serializable;
import java.security.Principal;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
package ca.nrc.cadc.auth;

import javax.security.auth.Subject;

import org.apache.log4j.Logger;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.date.DateUtil;

import ca.nrc.cadc.util.PropertiesReader;
import java.io.IOException;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,15 @@

import ca.nrc.cadc.util.ArrayUtil;
import ca.nrc.cadc.util.StringUtil;

import java.security.AccessControlException;
import java.security.Principal;
import java.security.cert.X509Certificate;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Set;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;

/**
Expand Down
3 changes: 0 additions & 3 deletions cadc-util/src/main/java/ca/nrc/cadc/auth/SignedToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
import ca.nrc.cadc.util.RsaSignatureGenerator;
import ca.nrc.cadc.util.RsaSignatureVerifier;
import ca.nrc.cadc.util.StringUtil;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.Serializable;
Expand All @@ -87,9 +86,7 @@
import java.util.List;
import java.util.Set;
import java.util.UUID;

import javax.security.auth.x500.X500Principal;

import org.apache.log4j.Logger;

/**
Expand Down
3 changes: 0 additions & 3 deletions cadc-util/src/main/java/ca/nrc/cadc/auth/TokenValidator.java
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,10 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.auth.NotAuthenticatedException.AuthError;

import java.security.AccessControlException;
import java.util.List;
import java.util.Set;

import javax.security.auth.Subject;

import org.apache.log4j.Logger;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,13 @@
package ca.nrc.cadc.auth;

import ca.nrc.cadc.util.Base64;

import java.security.PrivateKey;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
import java.util.Collection;
import java.util.Date;
import java.util.Set;

import javax.security.auth.x500.X500Principal;

import org.apache.log4j.Logger;

/**
Expand Down
1 change: 0 additions & 1 deletion cadc-util/src/main/java/ca/nrc/cadc/db/DBConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
package ca.nrc.cadc.db;

import ca.nrc.cadc.util.StringUtil;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;

import javax.naming.Binding;
import javax.naming.Context;
import javax.naming.Name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
package ca.nrc.cadc.db;

import java.util.Hashtable;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
package ca.nrc.cadc.exec;

import ca.nrc.cadc.util.ArrayUtil;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
Expand All @@ -45,7 +44,6 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

/**
Expand Down
2 changes: 0 additions & 2 deletions cadc-util/src/main/java/ca/nrc/cadc/log/ServletLogInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,9 @@
package ca.nrc.cadc.log;

import ca.nrc.cadc.net.NetUtil;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
import java.util.List;
import java.util.Set;
import java.util.UUID;

import javax.security.auth.Subject;
import org.apache.log4j.Logger;

Expand Down Expand Up @@ -120,7 +119,9 @@ public abstract class WebServiceLogInfo {

public String user;

protected WebServiceLogInfo() { }
protected WebServiceLogInfo() {

}

/**
* Generates the log.info message for the start of the request.
Expand Down
1 change: 0 additions & 1 deletion cadc-util/src/main/java/ca/nrc/cadc/net/AuthChallenge.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@

import java.util.Map;
import java.util.TreeMap;

import org.apache.log4j.Logger;

/**
Expand Down
6 changes: 0 additions & 6 deletions cadc-util/src/main/java/ca/nrc/cadc/net/HttpPost.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,9 @@

import ca.nrc.cadc.auth.NotAuthenticatedException;
import ca.nrc.cadc.io.ByteLimitExceededException;
import ca.nrc.cadc.net.event.TransferEvent;

import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
Expand All @@ -92,7 +87,6 @@
import java.util.TreeMap;
import java.util.UUID;
import javax.net.ssl.HttpsURLConnection;

import org.apache.log4j.Logger;

/**
Expand Down
Loading
Loading