@@ -97,8 +97,8 @@ protected final void createInternal( final T resource, final UriComponentsBuilde
9797 try {
9898 getService ().create ( resource );
9999 }
100- // TODO: to remove or document some of these
101- catch ( final IllegalStateException ex ){
100+ // - these are disabled for now - the IllegalStateException may be reenabled at some point
101+ /* catch( final IllegalStateException ex ){
102102 logger.error( "IllegalStateException on create operation for: " + resource.getClass().getSimpleName() );
103103 logger.warn( "IllegalStateException on create operation for: " + resource.getClass().getSimpleName(), ex );
104104 throw new ResourceNotFoundException( ex );
@@ -107,7 +107,7 @@ protected final void createInternal( final T resource, final UriComponentsBuilde
107107 logger.error( "IllegalArgumentException on create operation for: " + resource.getClass().getSimpleName() );
108108 logger.warn( "IllegalArgumentException on create operation for: " + resource.getClass().getSimpleName(), ex );
109109 throw new ConflictException( ex );
110- }
110+ }*/
111111 catch ( final DataIntegrityViolationException ex ){ // on unique constraint
112112 logger .error ( "DataIntegrityViolationException on create operation for: " + resource .getClass ().getSimpleName () );
113113 logger .warn ( "DataIntegrityViolationException on create operation for: " + resource .getClass ().getSimpleName (), ex );
@@ -125,8 +125,7 @@ protected final void createInternal( final T resource, final UriComponentsBuilde
125125 }
126126
127127 // - note: mind the autoboxing and potential NPE when the resource has null id at this point (likely when working with DTOs)
128- final ResourceCreatedEvent < T > resourceCreatedEvent = new ResourceCreatedEvent < T >( clazz , uriBuilder , response , resource .getId () );
129- eventPublisher .publishEvent ( resourceCreatedEvent );
128+ eventPublisher .publishEvent ( new ResourceCreatedEvent < T >( clazz , uriBuilder , response , resource .getId () ) );
130129 }
131130
132131 // update
0 commit comments