From b389260dec0d069f11fc6039cb3d87c16fe1269b Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Fri, 18 Sep 2015 05:47:06 -0400 Subject: [PATCH] updated copyright --- .../analyzer/ComposerLockAnalyzer.java | 3 ++- .../data/composer/ComposerDependency.java | 15 +++++++++++---- .../data/composer/ComposerException.java | 6 +++--- .../data/composer/ComposerLockParser.java | 19 ++++++++++++++----- .../analyzer/ComposerLockAnalyzerTest.java | 2 +- .../data/composer/ComposerLockParserTest.java | 9 +++++---- 6 files changed, 36 insertions(+), 18 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzer.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzer.java index 35b0b5a2d..d91564180 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzer.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzer.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2015 OWASP. All Rights Reserved. */ package org.owasp.dependencycheck.analyzer; @@ -42,6 +42,7 @@ import java.security.MessageDigest; * @author colezlaw */ public class ComposerLockAnalyzer extends AbstractFileTypeAnalyzer { + /** * The logger */ diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerDependency.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerDependency.java index a269567e8..7dc4b1448 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerDependency.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerDependency.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2015 OWASP. All Rights Reserved. */ package org.owasp.dependencycheck.data.composer; @@ -23,13 +23,20 @@ package org.owasp.dependencycheck.data.composer; * @author colezlaw */ public final class ComposerDependency { - /** The group */ + + /** + * The group + */ private final String group; - /** The project */ + /** + * The project + */ private final String project; - /** The version */ + /** + * The version + */ private final String version; /** diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerException.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerException.java index b83cafba0..de75ae095 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerException.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerException.java @@ -13,17 +13,17 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2015 OWASP. All Rights Reserved. */ package org.owasp.dependencycheck.data.composer; /** - * Represents an exception when handling a composer.json or composer.lock - * file. Generally used to wrap a downstream exception. + * Represents an exception when handling a composer.json or composer.lock file. Generally used to wrap a downstream exception. * * @author colezlaw */ public class ComposerException extends RuntimeException { + /** * Creates a ComposerException with default message. */ diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerLockParser.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerLockParser.java index b832aa0ab..114c8580a 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerLockParser.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/data/composer/ComposerLockParser.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2015 OWASP. All Rights Reserved. */ package org.owasp.dependencycheck.data.composer; @@ -36,16 +36,25 @@ import java.util.List; * @author colezlaw */ public class ComposerLockParser { - /** The JsonReader for parsing JSON */ + + /** + * The JsonReader for parsing JSON + */ private final JsonReader jsonReader; - /** The input stream we'll read */ + /** + * The input stream we'll read + */ private final InputStream inputStream; // NOPMD - it gets set in the constructor, read later - /** The List of ComposerDependencies found */ + /** + * The List of ComposerDependencies found + */ private final List composerDependencies; - /** The LOGGER */ + /** + * The LOGGER + */ private static final Logger LOGGER = LoggerFactory.getLogger(ComposerLockParser.class); /** diff --git a/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzerTest.java b/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzerTest.java index 647ab83b1..27f5a0a69 100644 --- a/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzerTest.java +++ b/dependency-check-core/src/test/java/org/owasp/dependencycheck/analyzer/ComposerLockAnalyzerTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2015 OWASP. All Rights Reserved. */ package org.owasp.dependencycheck.analyzer; diff --git a/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/composer/ComposerLockParserTest.java b/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/composer/ComposerLockParserTest.java index 64349eb0a..24e5e5767 100644 --- a/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/composer/ComposerLockParserTest.java +++ b/dependency-check-core/src/test/java/org/owasp/dependencycheck/data/composer/ComposerLockParserTest.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. * - * Copyright (c) 2012 Jeremy Long. All Rights Reserved. + * Copyright (c) 2015 OWASP. All Rights Reserved. */ package org.owasp.dependencycheck.data.composer; @@ -30,6 +30,7 @@ import static org.junit.Assert.*; * Created by colezlaw on 9/5/15. */ public class ComposerLockParserTest { + private InputStream inputStream; @Before @@ -45,21 +46,21 @@ public class ComposerLockParserTest { assertTrue(clp.getDependencies().contains(new ComposerDependency("symfony", "translation", "2.7.3"))); } - @Test(expected=ComposerException.class) + @Test(expected = ComposerException.class) public void testNotJSON() throws Exception { String input = "NOT VALID JSON"; ComposerLockParser clp = new ComposerLockParser(new ByteArrayInputStream(input.getBytes(Charset.defaultCharset()))); clp.process(); } - @Test(expected=ComposerException.class) + @Test(expected = ComposerException.class) public void testNotComposer() throws Exception { String input = "[\"ham\",\"eggs\"]"; ComposerLockParser clp = new ComposerLockParser(new ByteArrayInputStream(input.getBytes(Charset.defaultCharset()))); clp.process(); } - @Test(expected=ComposerException.class) + @Test(expected = ComposerException.class) public void testNotPackagesArray() throws Exception { String input = "{\"packages\":\"eleventy\"}"; ComposerLockParser clp = new ComposerLockParser(new ByteArrayInputStream(input.getBytes(Charset.defaultCharset())));