Skip to content

Instantly share code, notes, and snippets.

View admiyo's full-sized avatar

Adam Young admiyo

View GitHub Profile
ayoung@ayoung proxy]$ git diff
diff --git a/proxy/build.xml b/proxy/build.xml
index 9f6d61e..078b875 100644
--- a/proxy/build.xml
+++ b/proxy/build.xml
@@ -16,6 +16,7 @@
<path id="testjars">
<fileset dir="${test.lib.dir}" includes="*.jar" />
+ <fileset dir="${test.lib.dir}/../resources" includes="*.js" />
* Copyright (c) 2009 Red Hat, Inc.
package org.fedoraproject.candlepin.guice;
import java.io.Reader;
/**
* ScriptEngineProvider
*/
public class RulesReaderProvider implements Provider<Reader> {
public JavascriptEnforcer(DateSource dateSource, RulesCurator rulesCurator,
PreEntHelper preHelper, PostEntHelper postHelper,
ProductServiceAdapter prodAdapter) {
this(dateSource, new StringReader(rulesCurator.getRules().getRules()),
preHelper, postHelper, prodAdapter, new ScriptEngineManager()
.getEngineByName("JavaScript"));
}
@Inject
public JavascriptEnforcer(DateSource dateSource, Reader rulesReader,
Exception in thread "Timer-0" java.lang.NullPointerException
at org.apache.log4j.LogManager.getLogger(LogManager.java:188)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289)
at org.apache.commons.logging.impl.Log4JLogger.debug(Log4JLogger.java:177)
at org.quartz.utils.UpdateChecker.checkForUpdate(UpdateChecker.java:51)
at org.quartz.utils.UpdateChecker.run(UpdateChecker.java:39)
at java.util.TimerThread.mainLoop(Timer.java:534)
at java.util.TimerThread.run(Timer.java:484)
/**
* delete the consumer.
- * @param uuid uuid of the consumer to delete.
+ *
+ * @param uuid
+ * uuid of the consumer to delete.
*/
@DELETE
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -210,70 +225,92 @@ public class ConsumerResource {
/**
* delete the consumer.
- * @param uuid uuid of the consumer to delete.
+ *
+ * @param uuid
+ * uuid of the consumer to delete.
*/
@DELETE
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
@@ -210,70 +225,92 @@ public class ConsumerResource {
diff --git a/proxy/src/main/java/org/fedoraproject/candlepin/model/ConsumerCurator.java b/proxy/src/main/java/org/fedoraproject/candlepin/model/ConsumerCurator.java
index d78ec0a..a27c6be 100644
--- a/proxy/src/main/java/org/fedoraproject/candlepin/model/ConsumerCurator.java
+++ b/proxy/src/main/java/org/fedoraproject/candlepin/model/ConsumerCurator.java
@@ -27,6 +27,7 @@ import com.wideplay.warp.persist.Transactional;
*/
public class ConsumerCurator extends AbstractHibernateCurator<Consumer> {
+ @Inject private ConsumerIdentityCertificateCurator consumerIdentityCertificateCurator;
@Inject private ConsumerFactCurator consumerInfoCurator;
--- a/proxy/src/main/java/org/fedoraproject/candlepin/resource/ConsumerResource
+++ b/proxy/src/main/java/org/fedoraproject/candlepin/resource/ConsumerResource
@@ -157,7 +157,7 @@ public class ConsumerResource {
@POST
@Consumes({ MediaType.APPLICATION_JSON })
@Produces({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML })
- public Consumer create(Consumer in) {
+ public Consumer create(Consumer in) throws BadRequestException {
// API:registerConsumer
Owner owner = ownerCurator.findAll().get(0); // TODO: actually get cur
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 616
EJBContainerInvocation(MethodInvocation).invokeTarget() line: 121
EJBContainerInvocation(MethodInvocation).invokeNext() line: 110
InvocationContextImpl.proceed() line: 166
TransactionInterruptInterceptor.addCheckedActionToTransactionManager(InvocationContext) line: 77
NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
NativeMethodAccessorImpl.invoke(Object, Object[]) line: 57
DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43
Method.invoke(Object, Object...) line: 616
* RHQ Management Platform
package org.rhq.enterprise.server.configuration;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public class ConfigurationValidationException extends Exception {
private static final long serialVersionUID = -6924768743906659205L;